diff --git a/.env.example b/.env.example deleted file mode 100644 index 9a58aee..0000000 --- a/.env.example +++ /dev/null @@ -1,13 +0,0 @@ -DATABASE_URL=postgres://postgres:postgres@localhost:5432/buildfor_life_ops -SESSION_SECRET=replace-with-at-least-32-random-bytes-hex -PUBLIC_BASE_URL=http://localhost:5173 - -STORAGE_BACKEND=local -STORAGE_LOCAL_ROOT=./storage -STORAGE_SIGNING_SECRET=replace-with-at-least-32-random-bytes-hex - -OIDC_ENABLED=false -OIDC_ISSUER= -OIDC_CLIENT_ID= -OIDC_CLIENT_SECRET= -OIDC_REDIRECT_URI= diff --git a/drizzle/0001_phase1_assets_properties_documents.sql b/drizzle/0001_phase1_assets_properties_documents.sql new file mode 100644 index 0000000..28af2e6 --- /dev/null +++ b/drizzle/0001_phase1_assets_properties_documents.sql @@ -0,0 +1,140 @@ +CREATE TABLE "asset_field_defs" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "asset_type_id" uuid NOT NULL, + "key" varchar(64) NOT NULL, + "label" varchar(128) NOT NULL, + "type" "field_type" NOT NULL, + "required" boolean DEFAULT false NOT NULL, + "order" integer DEFAULT 0 NOT NULL, + "enum_values" text[], + "unit" varchar(32), + "placeholder" varchar(255), + "help_text" text, + "deprecated_at" timestamp with time zone, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "asset_location_history" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "asset_id" uuid NOT NULL, + "from_kind" "container_kind", + "from_project_id" uuid, + "from_property_id" uuid, + "to_kind" "container_kind" NOT NULL, + "to_project_id" uuid, + "to_property_id" uuid, + "moved_by" uuid, + "moved_at" timestamp with time zone DEFAULT now() NOT NULL, + "reason" text +); +--> statement-breakpoint +CREATE TABLE "asset_logs" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "asset_id" uuid NOT NULL, + "author_id" uuid, + "body" text NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "asset_types" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid, + "parent_id" uuid, + "name" varchar(128) NOT NULL, + "slug" varchar(128) NOT NULL, + "icon" varchar(64), + "description" text, + "schema_version" integer DEFAULT 1 NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "assets" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid NOT NULL, + "asset_type_id" uuid NOT NULL, + "name" varchar(255) NOT NULL, + "tag" varchar(64), + "serial_number" varchar(128), + "manufacturer" varchar(128), + "model" varchar(128), + "purchased_at" timestamp with time zone, + "current_container_kind" "container_kind" NOT NULL, + "current_project_id" uuid, + "current_property_id" uuid, + "custom_fields" jsonb DEFAULT '{}'::jsonb NOT NULL, + "search_tsv" text, + "created_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + "deleted_at" timestamp with time zone +); +--> statement-breakpoint +CREATE TABLE "documents" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid NOT NULL, + "scope_type" "doc_scope" NOT NULL, + "scope_id" uuid NOT NULL, + "filename" varchar(512) NOT NULL, + "mime_type" varchar(128) NOT NULL, + "size_bytes" bigint NOT NULL, + "sha256" varchar(64) NOT NULL, + "storage_key" varchar(512) NOT NULL, + "uploaded_by" uuid, + "uploaded_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "properties" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid NOT NULL, + "name" varchar(255) NOT NULL, + "kind" varchar(64), + "address_line1" varchar(255), + "address_line2" varchar(255), + "city" varchar(128), + "region" varchar(128), + "postal_code" varchar(32), + "country_code" varchar(2), + "lat" numeric(9, 6), + "lng" numeric(9, 6), + "notes" text, + "created_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + "deleted_at" timestamp with time zone +); +--> statement-breakpoint +ALTER TABLE "asset_field_defs" ADD CONSTRAINT "asset_field_defs_asset_type_id_asset_types_id_fk" FOREIGN KEY ("asset_type_id") REFERENCES "public"."asset_types"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "asset_location_history" ADD CONSTRAINT "asset_location_history_asset_id_assets_id_fk" FOREIGN KEY ("asset_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "asset_location_history" ADD CONSTRAINT "asset_location_history_from_property_id_properties_id_fk" FOREIGN KEY ("from_property_id") REFERENCES "public"."properties"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "asset_location_history" ADD CONSTRAINT "asset_location_history_to_property_id_properties_id_fk" FOREIGN KEY ("to_property_id") REFERENCES "public"."properties"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "asset_location_history" ADD CONSTRAINT "asset_location_history_moved_by_users_id_fk" FOREIGN KEY ("moved_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "asset_logs" ADD CONSTRAINT "asset_logs_asset_id_assets_id_fk" FOREIGN KEY ("asset_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "asset_logs" ADD CONSTRAINT "asset_logs_author_id_users_id_fk" FOREIGN KEY ("author_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "asset_types" ADD CONSTRAINT "asset_types_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "assets" ADD CONSTRAINT "assets_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "assets" ADD CONSTRAINT "assets_asset_type_id_asset_types_id_fk" FOREIGN KEY ("asset_type_id") REFERENCES "public"."asset_types"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "assets" ADD CONSTRAINT "assets_current_property_id_properties_id_fk" FOREIGN KEY ("current_property_id") REFERENCES "public"."properties"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "assets" ADD CONSTRAINT "assets_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "documents" ADD CONSTRAINT "documents_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "documents" ADD CONSTRAINT "documents_uploaded_by_users_id_fk" FOREIGN KEY ("uploaded_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "properties" ADD CONSTRAINT "properties_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "properties" ADD CONSTRAINT "properties_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE UNIQUE INDEX "asset_field_defs_type_key_uq" ON "asset_field_defs" USING btree ("asset_type_id","key");--> statement-breakpoint +CREATE INDEX "asset_field_defs_by_type" ON "asset_field_defs" USING btree ("asset_type_id","order");--> statement-breakpoint +CREATE INDEX "alh_by_asset" ON "asset_location_history" USING btree ("asset_id","moved_at");--> statement-breakpoint +CREATE INDEX "asset_logs_by_asset" ON "asset_logs" USING btree ("asset_id","created_at");--> statement-breakpoint +CREATE UNIQUE INDEX "asset_types_company_slug_uq" ON "asset_types" USING btree ("company_id","slug");--> statement-breakpoint +CREATE INDEX "asset_types_by_parent" ON "asset_types" USING btree ("parent_id");--> statement-breakpoint +CREATE INDEX "assets_by_company" ON "assets" USING btree ("company_id");--> statement-breakpoint +CREATE INDEX "assets_by_type" ON "assets" USING btree ("asset_type_id");--> statement-breakpoint +CREATE INDEX "assets_by_project" ON "assets" USING btree ("current_project_id");--> statement-breakpoint +CREATE INDEX "assets_by_property" ON "assets" USING btree ("current_property_id");--> statement-breakpoint +CREATE UNIQUE INDEX "assets_company_tag_uq" ON "assets" USING btree ("company_id","tag");--> statement-breakpoint +CREATE UNIQUE INDEX "assets_company_serial_uq" ON "assets" USING btree ("company_id","serial_number");--> statement-breakpoint +CREATE INDEX "docs_by_scope" ON "documents" USING btree ("scope_type","scope_id");--> statement-breakpoint +CREATE INDEX "docs_by_company" ON "documents" USING btree ("company_id");--> statement-breakpoint +CREATE INDEX "docs_by_hash" ON "documents" USING btree ("sha256");--> statement-breakpoint +CREATE UNIQUE INDEX "docs_storage_key_uq" ON "documents" USING btree ("storage_key");--> statement-breakpoint +CREATE INDEX "properties_by_company" ON "properties" USING btree ("company_id"); \ No newline at end of file diff --git a/drizzle/0002_phase1_constraints_and_search.sql b/drizzle/0002_phase1_constraints_and_search.sql new file mode 100644 index 0000000..a19ae86 --- /dev/null +++ b/drizzle/0002_phase1_constraints_and_search.sql @@ -0,0 +1,112 @@ +-- Phase 1 follow-up: integrity constraints, FTS, GIN, partial FK, +-- and updated_at + asset_types.schema_version triggers. +-- Drizzle-kit can't express any of these from the TS schema, so they live here. + +-- --------------------------------------------------------------------------- +-- 1. assets.current_container_kind XOR location FK +-- --------------------------------------------------------------------------- +ALTER TABLE "assets" ADD CONSTRAINT "assets_location_xor" CHECK ( + (current_container_kind = 'project' AND current_project_id IS NOT NULL AND current_property_id IS NULL) + OR + (current_container_kind = 'property' AND current_property_id IS NOT NULL AND current_project_id IS NULL) +); +--> statement-breakpoint + +ALTER TABLE "asset_location_history" ADD CONSTRAINT "alh_to_xor" CHECK ( + (to_kind = 'project' AND to_project_id IS NOT NULL AND to_property_id IS NULL) + OR + (to_kind = 'property' AND to_property_id IS NOT NULL AND to_project_id IS NULL) +); +--> statement-breakpoint + +-- --------------------------------------------------------------------------- +-- 2. Self-referential FK on asset_types.parent_id +-- --------------------------------------------------------------------------- +ALTER TABLE "asset_types" ADD CONSTRAINT "asset_types_parent_id_fk" + FOREIGN KEY ("parent_id") REFERENCES "asset_types"("id") ON DELETE SET NULL; +--> statement-breakpoint + +-- --------------------------------------------------------------------------- +-- 3. JSONB GIN index on assets.custom_fields +-- --------------------------------------------------------------------------- +CREATE INDEX "assets_custom_fields_gin" ON "assets" USING GIN ("custom_fields" jsonb_path_ops); +--> statement-breakpoint + +-- --------------------------------------------------------------------------- +-- 4. Full-text search on assets (tsvector + trigger + GIN) +-- --------------------------------------------------------------------------- +ALTER TABLE "assets" ALTER COLUMN "search_tsv" TYPE tsvector USING NULL::tsvector; +--> statement-breakpoint + +CREATE OR REPLACE FUNCTION assets_tsv_trigger() RETURNS trigger AS $$ +BEGIN + NEW.search_tsv := + setweight(to_tsvector('simple', coalesce(NEW.name, '')), 'A') || + setweight(to_tsvector('simple', coalesce(NEW.tag, '')), 'B') || + setweight(to_tsvector('simple', coalesce(NEW.serial_number, '')), 'B') || + setweight(to_tsvector('simple', coalesce(NEW.manufacturer, '')), 'C') || + setweight(to_tsvector('simple', coalesce(NEW.model, '')), 'C'); + RETURN NEW; +END $$ LANGUAGE plpgsql; +--> statement-breakpoint + +CREATE TRIGGER assets_tsv_upd BEFORE INSERT OR UPDATE + ON "assets" FOR EACH ROW EXECUTE FUNCTION assets_tsv_trigger(); +--> statement-breakpoint + +CREATE INDEX "assets_search_tsv_gin" ON "assets" USING GIN ("search_tsv"); +--> statement-breakpoint + +-- --------------------------------------------------------------------------- +-- 5. Generic updated_at trigger, attached to every Phase-0/1 table that has it +-- --------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION set_updated_at() RETURNS trigger AS $$ +BEGIN + NEW.updated_at := now(); + RETURN NEW; +END $$ LANGUAGE plpgsql; +--> statement-breakpoint + +CREATE TRIGGER companies_set_updated_at BEFORE UPDATE ON "companies" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER users_set_updated_at BEFORE UPDATE ON "users" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER properties_set_updated_at BEFORE UPDATE ON "properties" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER asset_types_set_updated_at BEFORE UPDATE ON "asset_types" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER asset_field_defs_set_updated_at BEFORE UPDATE ON "asset_field_defs" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER assets_set_updated_at BEFORE UPDATE ON "assets" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint + +-- --------------------------------------------------------------------------- +-- 6. Bump asset_types.schema_version when its field defs change +-- (cache key for the runtime Zod validator) +-- --------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION bump_asset_type_schema_version() RETURNS trigger AS $$ +DECLARE + target_id uuid; +BEGIN + IF TG_OP = 'DELETE' THEN + target_id := OLD.asset_type_id; + ELSE + target_id := NEW.asset_type_id; + END IF; + UPDATE asset_types + SET schema_version = schema_version + 1, + updated_at = now() + WHERE id = target_id; + RETURN NULL; +END $$ LANGUAGE plpgsql; +--> statement-breakpoint + +CREATE TRIGGER asset_field_defs_bump_version + AFTER INSERT OR UPDATE OR DELETE ON "asset_field_defs" + FOR EACH ROW EXECUTE FUNCTION bump_asset_type_schema_version(); diff --git a/drizzle/0003_phase2_checklists_and_maintenance.sql b/drizzle/0003_phase2_checklists_and_maintenance.sql new file mode 100644 index 0000000..4c41d95 --- /dev/null +++ b/drizzle/0003_phase2_checklists_and_maintenance.sql @@ -0,0 +1,109 @@ +CREATE TABLE "checklist_instances" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid NOT NULL, + "template_id" uuid, + "scope_type" "checklist_scope" NOT NULL, + "scope_id" uuid, + "title" varchar(255), + "created_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "completed_at" timestamp with time zone +); +--> statement-breakpoint +CREATE TABLE "checklist_items" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "instance_id" uuid NOT NULL, + "text" varchar(500) NOT NULL, + "done" boolean DEFAULT false NOT NULL, + "done_at" timestamp with time zone, + "done_by" uuid, + "required" boolean DEFAULT false NOT NULL, + "order" integer DEFAULT 0 NOT NULL, + "note" text +); +--> statement-breakpoint +CREATE TABLE "checklist_template_items" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "template_id" uuid NOT NULL, + "text" varchar(500) NOT NULL, + "order" integer DEFAULT 0 NOT NULL, + "required" boolean DEFAULT false NOT NULL +); +--> statement-breakpoint +CREATE TABLE "checklist_templates" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid NOT NULL, + "name" varchar(255) NOT NULL, + "description" text, + "created_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "maintenance_events" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "asset_id" uuid NOT NULL, + "schedule_id" uuid, + "performed_at" timestamp with time zone NOT NULL, + "performed_by" uuid, + "notes" text, + "usage_reading" numeric(18, 4), + "checklist_instance_id" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "maintenance_schedules" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "asset_id" uuid NOT NULL, + "name" varchar(255) NOT NULL, + "kind" "schedule_kind" NOT NULL, + "interval_value" integer NOT NULL, + "interval_unit" interval_unit NOT NULL, + "last_serviced_at" timestamp with time zone, + "next_due_at" timestamp with time zone, + "next_due_usage" numeric(18, 4), + "checklist_template_id" uuid, + "active" boolean DEFAULT true NOT NULL, + "notes" text, + "created_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "usage_readings" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "asset_id" uuid NOT NULL, + "reading" numeric(18, 4) NOT NULL, + "unit" interval_unit NOT NULL, + "recorded_at" timestamp with time zone DEFAULT now() NOT NULL, + "recorded_by" uuid, + "notes" text +); +--> statement-breakpoint +ALTER TABLE "checklist_instances" ADD CONSTRAINT "checklist_instances_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "checklist_instances" ADD CONSTRAINT "checklist_instances_template_id_checklist_templates_id_fk" FOREIGN KEY ("template_id") REFERENCES "public"."checklist_templates"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "checklist_instances" ADD CONSTRAINT "checklist_instances_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "checklist_items" ADD CONSTRAINT "checklist_items_instance_id_checklist_instances_id_fk" FOREIGN KEY ("instance_id") REFERENCES "public"."checklist_instances"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "checklist_items" ADD CONSTRAINT "checklist_items_done_by_users_id_fk" FOREIGN KEY ("done_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "checklist_template_items" ADD CONSTRAINT "checklist_template_items_template_id_checklist_templates_id_fk" FOREIGN KEY ("template_id") REFERENCES "public"."checklist_templates"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "checklist_templates" ADD CONSTRAINT "checklist_templates_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "checklist_templates" ADD CONSTRAINT "checklist_templates_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "maintenance_events" ADD CONSTRAINT "maintenance_events_asset_id_assets_id_fk" FOREIGN KEY ("asset_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "maintenance_events" ADD CONSTRAINT "maintenance_events_schedule_id_maintenance_schedules_id_fk" FOREIGN KEY ("schedule_id") REFERENCES "public"."maintenance_schedules"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "maintenance_events" ADD CONSTRAINT "maintenance_events_performed_by_users_id_fk" FOREIGN KEY ("performed_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "maintenance_events" ADD CONSTRAINT "maintenance_events_checklist_instance_id_checklist_instances_id_fk" FOREIGN KEY ("checklist_instance_id") REFERENCES "public"."checklist_instances"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "maintenance_schedules" ADD CONSTRAINT "maintenance_schedules_asset_id_assets_id_fk" FOREIGN KEY ("asset_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "maintenance_schedules" ADD CONSTRAINT "maintenance_schedules_checklist_template_id_checklist_templates_id_fk" FOREIGN KEY ("checklist_template_id") REFERENCES "public"."checklist_templates"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "maintenance_schedules" ADD CONSTRAINT "maintenance_schedules_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "usage_readings" ADD CONSTRAINT "usage_readings_asset_id_assets_id_fk" FOREIGN KEY ("asset_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "usage_readings" ADD CONSTRAINT "usage_readings_recorded_by_users_id_fk" FOREIGN KEY ("recorded_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "ci_by_scope" ON "checklist_instances" USING btree ("scope_type","scope_id");--> statement-breakpoint +CREATE INDEX "ci_by_company" ON "checklist_instances" USING btree ("company_id");--> statement-breakpoint +CREATE INDEX "cit_by_instance" ON "checklist_items" USING btree ("instance_id","order");--> statement-breakpoint +CREATE INDEX "cti_by_template" ON "checklist_template_items" USING btree ("template_id","order");--> statement-breakpoint +CREATE INDEX "ct_by_company" ON "checklist_templates" USING btree ("company_id");--> statement-breakpoint +CREATE INDEX "me_by_asset_time" ON "maintenance_events" USING btree ("asset_id","performed_at");--> statement-breakpoint +CREATE INDEX "me_by_schedule" ON "maintenance_events" USING btree ("schedule_id");--> statement-breakpoint +CREATE INDEX "ms_by_asset" ON "maintenance_schedules" USING btree ("asset_id");--> statement-breakpoint +CREATE INDEX "ms_by_next_due" ON "maintenance_schedules" USING btree ("next_due_at");--> statement-breakpoint +CREATE INDEX "ur_by_asset_time" ON "usage_readings" USING btree ("asset_id","recorded_at"); \ No newline at end of file diff --git a/drizzle/0004_phase2_partial_indexes_and_triggers.sql b/drizzle/0004_phase2_partial_indexes_and_triggers.sql new file mode 100644 index 0000000..d225bff --- /dev/null +++ b/drizzle/0004_phase2_partial_indexes_and_triggers.sql @@ -0,0 +1,14 @@ +-- Phase 2 follow-up: partial indexes + updated_at triggers for the new tables. + +-- Partial index for the dashboard "overdue / upcoming time-based maintenance" query. +CREATE INDEX "ms_next_due_active" + ON "maintenance_schedules" ("next_due_at") + WHERE "kind" = 'time' AND "active" = true; +--> statement-breakpoint + +-- Reuse the set_updated_at() function from migration 0002. +CREATE TRIGGER checklist_templates_set_updated_at BEFORE UPDATE ON "checklist_templates" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER maintenance_schedules_set_updated_at BEFORE UPDATE ON "maintenance_schedules" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); diff --git a/drizzle/0005_phase3_projects_and_decisions.sql b/drizzle/0005_phase3_projects_and_decisions.sql new file mode 100644 index 0000000..0d2aadc --- /dev/null +++ b/drizzle/0005_phase3_projects_and_decisions.sql @@ -0,0 +1,94 @@ +CREATE TABLE "decision_events" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid NOT NULL, + "scope_type" "decision_scope" NOT NULL, + "scope_id" uuid NOT NULL, + "title" varchar(255) NOT NULL, + "body_md" text NOT NULL, + "alternatives_considered" text, + "cost_impact" numeric(18, 4), + "currency" varchar(3), + "approved_by" uuid, + "decided_at" timestamp with time zone NOT NULL, + "decided_by" uuid, + "tags" text[], + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + "deleted_at" timestamp with time zone +); +--> statement-breakpoint +CREATE TABLE "projects" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid NOT NULL, + "name" varchar(255) NOT NULL, + "code" varchar(64), + "description" text, + "status" varchar(32) DEFAULT 'active' NOT NULL, + "start_date" timestamp with time zone, + "end_date" timestamp with time zone, + "created_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + "deleted_at" timestamp with time zone +); +--> statement-breakpoint +CREATE TABLE "subtasks" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "task_id" uuid NOT NULL, + "name" varchar(500) NOT NULL, + "done" boolean DEFAULT false NOT NULL, + "order" integer DEFAULT 0 NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "tasks" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "work_package_id" uuid NOT NULL, + "title" varchar(255) NOT NULL, + "description" text, + "status" "task_status" DEFAULT 'todo' NOT NULL, + "assignee_id" uuid, + "due_at" timestamp with time zone, + "order" integer DEFAULT 0 NOT NULL, + "completed_at" timestamp with time zone, + "created_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + "deleted_at" timestamp with time zone +); +--> statement-breakpoint +CREATE TABLE "work_packages" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "project_id" uuid NOT NULL, + "name" varchar(255) NOT NULL, + "description" text, + "order" integer DEFAULT 0 NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + "deleted_at" timestamp with time zone +); +--> statement-breakpoint +ALTER TABLE "decision_events" ADD CONSTRAINT "decision_events_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "decision_events" ADD CONSTRAINT "decision_events_approved_by_users_id_fk" FOREIGN KEY ("approved_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "decision_events" ADD CONSTRAINT "decision_events_decided_by_users_id_fk" FOREIGN KEY ("decided_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "projects" ADD CONSTRAINT "projects_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "projects" ADD CONSTRAINT "projects_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "subtasks" ADD CONSTRAINT "subtasks_task_id_tasks_id_fk" FOREIGN KEY ("task_id") REFERENCES "public"."tasks"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "tasks" ADD CONSTRAINT "tasks_work_package_id_work_packages_id_fk" FOREIGN KEY ("work_package_id") REFERENCES "public"."work_packages"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "tasks" ADD CONSTRAINT "tasks_assignee_id_users_id_fk" FOREIGN KEY ("assignee_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "tasks" ADD CONSTRAINT "tasks_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "work_packages" ADD CONSTRAINT "work_packages_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "de_by_scope" ON "decision_events" USING btree ("scope_type","scope_id","decided_at");--> statement-breakpoint +CREATE INDEX "de_by_company" ON "decision_events" USING btree ("company_id");--> statement-breakpoint +CREATE INDEX "de_tags_gin" ON "decision_events" USING gin ("tags");--> statement-breakpoint +CREATE INDEX "projects_by_company" ON "projects" USING btree ("company_id");--> statement-breakpoint +CREATE UNIQUE INDEX "projects_company_code_uq" ON "projects" USING btree ("company_id","code");--> statement-breakpoint +CREATE INDEX "subtasks_by_task" ON "subtasks" USING btree ("task_id","order");--> statement-breakpoint +CREATE INDEX "tasks_by_wp" ON "tasks" USING btree ("work_package_id");--> statement-breakpoint +CREATE INDEX "tasks_by_assignee" ON "tasks" USING btree ("assignee_id");--> statement-breakpoint +CREATE INDEX "tasks_status_due" ON "tasks" USING btree ("status","due_at");--> statement-breakpoint +CREATE INDEX "work_packages_by_project" ON "work_packages" USING btree ("project_id");--> statement-breakpoint +ALTER TABLE "asset_location_history" ADD CONSTRAINT "asset_location_history_from_project_id_projects_id_fk" FOREIGN KEY ("from_project_id") REFERENCES "public"."projects"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "asset_location_history" ADD CONSTRAINT "asset_location_history_to_project_id_projects_id_fk" FOREIGN KEY ("to_project_id") REFERENCES "public"."projects"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "assets" ADD CONSTRAINT "assets_current_project_id_projects_id_fk" FOREIGN KEY ("current_project_id") REFERENCES "public"."projects"("id") ON DELETE restrict ON UPDATE no action; \ No newline at end of file diff --git a/drizzle/0006_phase3_partial_index_and_triggers.sql b/drizzle/0006_phase3_partial_index_and_triggers.sql new file mode 100644 index 0000000..b85e436 --- /dev/null +++ b/drizzle/0006_phase3_partial_index_and_triggers.sql @@ -0,0 +1,21 @@ +-- Phase 3 follow-up: partial index for open + due tasks, updated_at triggers. + +CREATE INDEX "tasks_open_due" + ON "tasks" ("due_at") + WHERE "status" IN ('todo','doing','blocked') AND "deleted_at" IS NULL; +--> statement-breakpoint + +CREATE TRIGGER projects_set_updated_at BEFORE UPDATE ON "projects" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER work_packages_set_updated_at BEFORE UPDATE ON "work_packages" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER tasks_set_updated_at BEFORE UPDATE ON "tasks" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER subtasks_set_updated_at BEFORE UPDATE ON "subtasks" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint +CREATE TRIGGER decision_events_set_updated_at BEFORE UPDATE ON "decision_events" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); diff --git a/drizzle/0007_phase4_wiki.sql b/drizzle/0007_phase4_wiki.sql new file mode 100644 index 0000000..4625de4 --- /dev/null +++ b/drizzle/0007_phase4_wiki.sql @@ -0,0 +1,33 @@ +CREATE TABLE "wiki_pages" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "company_id" uuid NOT NULL, + "scope_type" "wiki_scope" NOT NULL, + "scope_id" uuid, + "slug" varchar(128) NOT NULL, + "title" varchar(255) NOT NULL, + "current_revision_id" uuid, + "created_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + "deleted_at" timestamp with time zone +); +--> statement-breakpoint +CREATE TABLE "wiki_revisions" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "page_id" uuid NOT NULL, + "revision" integer NOT NULL, + "title" varchar(255) NOT NULL, + "body_md" text NOT NULL, + "body_tsv" text, + "edited_by" uuid, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "comment" varchar(500) +); +--> statement-breakpoint +ALTER TABLE "wiki_pages" ADD CONSTRAINT "wiki_pages_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "wiki_pages" ADD CONSTRAINT "wiki_pages_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "wiki_revisions" ADD CONSTRAINT "wiki_revisions_page_id_wiki_pages_id_fk" FOREIGN KEY ("page_id") REFERENCES "public"."wiki_pages"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "wiki_revisions" ADD CONSTRAINT "wiki_revisions_edited_by_users_id_fk" FOREIGN KEY ("edited_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "wiki_by_scope" ON "wiki_pages" USING btree ("scope_type","scope_id");--> statement-breakpoint +CREATE UNIQUE INDEX "wiki_rev_page_rev_uq" ON "wiki_revisions" USING btree ("page_id","revision");--> statement-breakpoint +CREATE INDEX "wiki_rev_by_page" ON "wiki_revisions" USING btree ("page_id","revision"); \ No newline at end of file diff --git a/drizzle/0008_phase4_wiki_fts_and_uniq.sql b/drizzle/0008_phase4_wiki_fts_and_uniq.sql new file mode 100644 index 0000000..45d079b --- /dev/null +++ b/drizzle/0008_phase4_wiki_fts_and_uniq.sql @@ -0,0 +1,34 @@ +-- Phase 4 follow-up: tsvector + FTS trigger + GIN index for wiki_revisions, +-- NULLS NOT DISTINCT unique index on wiki_pages so global pages (scope_id IS NULL) +-- can't share a slug, and updated_at trigger. + +-- Convert body_tsv to a real tsvector column. +ALTER TABLE "wiki_revisions" ALTER COLUMN "body_tsv" TYPE tsvector USING NULL::tsvector; +--> statement-breakpoint + +CREATE OR REPLACE FUNCTION wiki_tsv_trigger() RETURNS trigger AS $$ +BEGIN + NEW.body_tsv := to_tsvector( + 'simple', + coalesce(NEW.title, '') || ' ' || coalesce(NEW.body_md, '') + ); + RETURN NEW; +END $$ LANGUAGE plpgsql; +--> statement-breakpoint + +CREATE TRIGGER wiki_tsv_upd BEFORE INSERT OR UPDATE ON "wiki_revisions" + FOR EACH ROW EXECUTE FUNCTION wiki_tsv_trigger(); +--> statement-breakpoint + +CREATE INDEX "wiki_body_tsv_gin" ON "wiki_revisions" USING GIN ("body_tsv"); +--> statement-breakpoint + +-- Slug uniqueness per (company, scope, slug). NULLS NOT DISTINCT (pg 15+) +-- means two global pages (scope_id IS NULL) with the same slug collide. +CREATE UNIQUE INDEX "wiki_scope_slug_uq" + ON "wiki_pages" ("company_id", "scope_type", "scope_id", "slug") + NULLS NOT DISTINCT; +--> statement-breakpoint + +CREATE TRIGGER wiki_pages_set_updated_at BEFORE UPDATE ON "wiki_pages" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); diff --git a/drizzle/0009_rooms_and_floors.sql b/drizzle/0009_rooms_and_floors.sql new file mode 100644 index 0000000..d9b9b71 --- /dev/null +++ b/drizzle/0009_rooms_and_floors.sql @@ -0,0 +1,33 @@ +CREATE TABLE "property_floors" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "property_id" uuid NOT NULL, + "label" varchar(32) NOT NULL, + "name" varchar(255), + "order" integer DEFAULT 0 NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "property_rooms" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "property_id" uuid NOT NULL, + "floor_id" uuid, + "name" varchar(255) NOT NULL, + "notes" text, + "order" integer DEFAULT 0 NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + "deleted_at" timestamp with time zone +); +--> statement-breakpoint +ALTER TABLE "assets" ADD COLUMN "current_room_id" uuid;--> statement-breakpoint +ALTER TABLE "property_floors" ADD CONSTRAINT "property_floors_property_id_properties_id_fk" FOREIGN KEY ("property_id") REFERENCES "public"."properties"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "property_rooms" ADD CONSTRAINT "property_rooms_property_id_properties_id_fk" FOREIGN KEY ("property_id") REFERENCES "public"."properties"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "property_rooms" ADD CONSTRAINT "property_rooms_floor_id_property_floors_id_fk" FOREIGN KEY ("floor_id") REFERENCES "public"."property_floors"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "floors_by_property" ON "property_floors" USING btree ("property_id","order");--> statement-breakpoint +CREATE UNIQUE INDEX "floors_property_label_uq" ON "property_floors" USING btree ("property_id","label");--> statement-breakpoint +CREATE INDEX "rooms_by_property" ON "property_rooms" USING btree ("property_id","order");--> statement-breakpoint +CREATE INDEX "rooms_by_floor" ON "property_rooms" USING btree ("floor_id");--> statement-breakpoint +CREATE UNIQUE INDEX "rooms_floor_name_uq" ON "property_rooms" USING btree ("property_id","floor_id","name");--> statement-breakpoint +ALTER TABLE "assets" ADD CONSTRAINT "assets_current_room_id_property_rooms_id_fk" FOREIGN KEY ("current_room_id") REFERENCES "public"."property_rooms"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "assets_by_room" ON "assets" USING btree ("current_room_id"); \ No newline at end of file diff --git a/drizzle/0010_rooms_check_and_triggers.sql b/drizzle/0010_rooms_check_and_triggers.sql new file mode 100644 index 0000000..fd981f7 --- /dev/null +++ b/drizzle/0010_rooms_check_and_triggers.sql @@ -0,0 +1,15 @@ +-- Rooms follow-up: constraints + updated_at triggers. + +-- A room assignment only makes sense when the asset is at a property. +ALTER TABLE "assets" ADD CONSTRAINT "assets_room_requires_property" CHECK ( + "current_room_id" IS NULL + OR "current_container_kind" = 'property' +); +--> statement-breakpoint + +CREATE TRIGGER property_floors_set_updated_at BEFORE UPDATE ON "property_floors" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); +--> statement-breakpoint + +CREATE TRIGGER property_rooms_set_updated_at BEFORE UPDATE ON "property_rooms" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); diff --git a/drizzle/0011_property_accounts.sql b/drizzle/0011_property_accounts.sql new file mode 100644 index 0000000..f10beab --- /dev/null +++ b/drizzle/0011_property_accounts.sql @@ -0,0 +1,17 @@ +CREATE TYPE "public"."account_kind" AS ENUM('water', 'electricity', 'gas', 'internet', 'phone', 'cable', 'waste', 'other');--> statement-breakpoint +CREATE TABLE "property_accounts" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "property_id" uuid NOT NULL, + "kind" "account_kind" NOT NULL, + "provider" varchar(128), + "label" varchar(128), + "account_number" varchar(128), + "meter_number" varchar(128), + "notes" text, + "order" integer DEFAULT 0 NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "property_accounts" ADD CONSTRAINT "property_accounts_property_id_properties_id_fk" FOREIGN KEY ("property_id") REFERENCES "public"."properties"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "accounts_by_property" ON "property_accounts" USING btree ("property_id","kind","order"); \ No newline at end of file diff --git a/drizzle/0012_accounts_updated_at_trigger.sql b/drizzle/0012_accounts_updated_at_trigger.sql new file mode 100644 index 0000000..4974816 --- /dev/null +++ b/drizzle/0012_accounts_updated_at_trigger.sql @@ -0,0 +1,3 @@ +-- Updated_at trigger for property_accounts. +CREATE TRIGGER property_accounts_set_updated_at BEFORE UPDATE ON "property_accounts" + FOR EACH ROW EXECUTE FUNCTION set_updated_at(); diff --git a/drizzle/0013_notifications.sql b/drizzle/0013_notifications.sql new file mode 100644 index 0000000..fd77cac --- /dev/null +++ b/drizzle/0013_notifications.sql @@ -0,0 +1,20 @@ +CREATE TYPE "public"."notification_kind" AS ENUM('task_assigned', 'asset_log_added', 'asset_moved', 'decision_created', 'maintenance_event_recorded', 'generic');--> statement-breakpoint +CREATE TABLE "notifications" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "user_id" uuid NOT NULL, + "company_id" uuid NOT NULL, + "kind" "notification_kind" NOT NULL, + "title" varchar(255) NOT NULL, + "body" text NOT NULL, + "link" varchar(1024), + "read_at" timestamp with time zone, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "users" ADD COLUMN "email_notifications" boolean DEFAULT true NOT NULL;--> statement-breakpoint +ALTER TABLE "users" ADD COLUMN "matrix_notifications" boolean DEFAULT false NOT NULL;--> statement-breakpoint +ALTER TABLE "users" ADD COLUMN "matrix_user_id" varchar(255);--> statement-breakpoint +ALTER TABLE "notifications" ADD CONSTRAINT "notifications_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "notifications" ADD CONSTRAINT "notifications_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "notifications_by_user_unread" ON "notifications" USING btree ("user_id","read_at","created_at");--> statement-breakpoint +CREATE INDEX "notifications_by_user_company" ON "notifications" USING btree ("user_id","company_id","created_at"); \ No newline at end of file diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json new file mode 100644 index 0000000..5823b2e --- /dev/null +++ b/drizzle/meta/0001_snapshot.json @@ -0,0 +1,1725 @@ +{ + "id": "512d624d-ad1a-47d3-8459-941e2709a7a2", + "prevId": "6c1750b0-e7c3-4bfd-af22-25dd7db8f073", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0002_snapshot.json b/drizzle/meta/0002_snapshot.json new file mode 100644 index 0000000..1c4e747 --- /dev/null +++ b/drizzle/meta/0002_snapshot.json @@ -0,0 +1,1725 @@ +{ + "id": "de08e17b-63bd-4a98-9361-349ca750d665", + "prevId": "512d624d-ad1a-47d3-8459-941e2709a7a2", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0003_snapshot.json b/drizzle/meta/0003_snapshot.json new file mode 100644 index 0000000..04c86c9 --- /dev/null +++ b/drizzle/meta/0003_snapshot.json @@ -0,0 +1,2621 @@ +{ + "id": "66c4a8b3-c54a-41a1-ae90-dab16a141600", + "prevId": "de08e17b-63bd-4a98-9361-349ca750d665", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0004_snapshot.json b/drizzle/meta/0004_snapshot.json new file mode 100644 index 0000000..4566cfc --- /dev/null +++ b/drizzle/meta/0004_snapshot.json @@ -0,0 +1,2621 @@ +{ + "id": "64cecc29-6730-428a-9b30-85e6dfa022d0", + "prevId": "66c4a8b3-c54a-41a1-ae90-dab16a141600", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0005_snapshot.json b/drizzle/meta/0005_snapshot.json new file mode 100644 index 0000000..2780dd2 --- /dev/null +++ b/drizzle/meta/0005_snapshot.json @@ -0,0 +1,3404 @@ +{ + "id": "58ec9a30-464f-49ba-86a3-a53e2ecb5952", + "prevId": "64cecc29-6730-428a-9b30-85e6dfa022d0", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0006_snapshot.json b/drizzle/meta/0006_snapshot.json new file mode 100644 index 0000000..1e57e03 --- /dev/null +++ b/drizzle/meta/0006_snapshot.json @@ -0,0 +1,3404 @@ +{ + "id": "62ab5898-a32b-4b11-845f-8e27e3a92a55", + "prevId": "58ec9a30-464f-49ba-86a3-a53e2ecb5952", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0007_snapshot.json b/drizzle/meta/0007_snapshot.json new file mode 100644 index 0000000..c441ad6 --- /dev/null +++ b/drizzle/meta/0007_snapshot.json @@ -0,0 +1,3675 @@ +{ + "id": "5350cede-ffde-4f72-941e-c9f50da24a28", + "prevId": "62ab5898-a32b-4b11-845f-8e27e3a92a55", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "wiki_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "current_revision_id": { + "name": "current_revision_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_by_scope": { + "name": "wiki_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_company_id_companies_id_fk": { + "name": "wiki_pages_company_id_companies_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_pages_created_by_users_id_fk": { + "name": "wiki_pages_created_by_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "page_id": { + "name": "page_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_tsv": { + "name": "body_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "edited_by": { + "name": "edited_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "comment": { + "name": "comment", + "type": "varchar(500)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_rev_page_rev_uq": { + "name": "wiki_rev_page_rev_uq", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_rev_by_page": { + "name": "wiki_rev_by_page", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_revisions_edited_by_users_id_fk": { + "name": "wiki_revisions_edited_by_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "edited_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0008_snapshot.json b/drizzle/meta/0008_snapshot.json new file mode 100644 index 0000000..f1699d6 --- /dev/null +++ b/drizzle/meta/0008_snapshot.json @@ -0,0 +1,3675 @@ +{ + "id": "6aaaf6b9-dffc-4574-909c-b4ea55a54ca5", + "prevId": "5350cede-ffde-4f72-941e-c9f50da24a28", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "wiki_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "current_revision_id": { + "name": "current_revision_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_by_scope": { + "name": "wiki_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_company_id_companies_id_fk": { + "name": "wiki_pages_company_id_companies_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_pages_created_by_users_id_fk": { + "name": "wiki_pages_created_by_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "page_id": { + "name": "page_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_tsv": { + "name": "body_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "edited_by": { + "name": "edited_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "comment": { + "name": "comment", + "type": "varchar(500)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_rev_page_rev_uq": { + "name": "wiki_rev_page_rev_uq", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_rev_by_page": { + "name": "wiki_rev_by_page", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_revisions_edited_by_users_id_fk": { + "name": "wiki_revisions_edited_by_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "edited_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0009_snapshot.json b/drizzle/meta/0009_snapshot.json new file mode 100644 index 0000000..3c54b39 --- /dev/null +++ b/drizzle/meta/0009_snapshot.json @@ -0,0 +1,3987 @@ +{ + "id": "a7e33df1-6655-4b7e-a0aa-88210705269d", + "prevId": "6aaaf6b9-dffc-4574-909c-b4ea55a54ca5", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_room_id": { + "name": "current_room_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_room": { + "name": "assets_by_room", + "columns": [ + { + "expression": "current_room_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_room_id_property_rooms_id_fk": { + "name": "assets_current_room_id_property_rooms_id_fk", + "tableFrom": "assets", + "tableTo": "property_rooms", + "columnsFrom": [ + "current_room_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "wiki_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "current_revision_id": { + "name": "current_revision_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_by_scope": { + "name": "wiki_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_company_id_companies_id_fk": { + "name": "wiki_pages_company_id_companies_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_pages_created_by_users_id_fk": { + "name": "wiki_pages_created_by_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "page_id": { + "name": "page_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_tsv": { + "name": "body_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "edited_by": { + "name": "edited_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "comment": { + "name": "comment", + "type": "varchar(500)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_rev_page_rev_uq": { + "name": "wiki_rev_page_rev_uq", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_rev_by_page": { + "name": "wiki_rev_by_page", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_revisions_edited_by_users_id_fk": { + "name": "wiki_revisions_edited_by_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "edited_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_floors": { + "name": "property_floors", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "floors_by_property": { + "name": "floors_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "floors_property_label_uq": { + "name": "floors_property_label_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "label", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_floors_property_id_properties_id_fk": { + "name": "property_floors_property_id_properties_id_fk", + "tableFrom": "property_floors", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_rooms": { + "name": "property_rooms", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "floor_id": { + "name": "floor_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "rooms_by_property": { + "name": "rooms_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_by_floor": { + "name": "rooms_by_floor", + "columns": [ + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_floor_name_uq": { + "name": "rooms_floor_name_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_rooms_property_id_properties_id_fk": { + "name": "property_rooms_property_id_properties_id_fk", + "tableFrom": "property_rooms", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "property_rooms_floor_id_property_floors_id_fk": { + "name": "property_rooms_floor_id_property_floors_id_fk", + "tableFrom": "property_rooms", + "tableTo": "property_floors", + "columnsFrom": [ + "floor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0010_snapshot.json b/drizzle/meta/0010_snapshot.json new file mode 100644 index 0000000..3f49487 --- /dev/null +++ b/drizzle/meta/0010_snapshot.json @@ -0,0 +1,3987 @@ +{ + "id": "58cedf4a-b57c-479a-a0da-1780975332d6", + "prevId": "a7e33df1-6655-4b7e-a0aa-88210705269d", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_room_id": { + "name": "current_room_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_room": { + "name": "assets_by_room", + "columns": [ + { + "expression": "current_room_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_room_id_property_rooms_id_fk": { + "name": "assets_current_room_id_property_rooms_id_fk", + "tableFrom": "assets", + "tableTo": "property_rooms", + "columnsFrom": [ + "current_room_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "wiki_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "current_revision_id": { + "name": "current_revision_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_by_scope": { + "name": "wiki_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_company_id_companies_id_fk": { + "name": "wiki_pages_company_id_companies_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_pages_created_by_users_id_fk": { + "name": "wiki_pages_created_by_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "page_id": { + "name": "page_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_tsv": { + "name": "body_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "edited_by": { + "name": "edited_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "comment": { + "name": "comment", + "type": "varchar(500)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_rev_page_rev_uq": { + "name": "wiki_rev_page_rev_uq", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_rev_by_page": { + "name": "wiki_rev_by_page", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_revisions_edited_by_users_id_fk": { + "name": "wiki_revisions_edited_by_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "edited_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_floors": { + "name": "property_floors", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "floors_by_property": { + "name": "floors_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "floors_property_label_uq": { + "name": "floors_property_label_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "label", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_floors_property_id_properties_id_fk": { + "name": "property_floors_property_id_properties_id_fk", + "tableFrom": "property_floors", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_rooms": { + "name": "property_rooms", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "floor_id": { + "name": "floor_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "rooms_by_property": { + "name": "rooms_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_by_floor": { + "name": "rooms_by_floor", + "columns": [ + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_floor_name_uq": { + "name": "rooms_floor_name_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_rooms_property_id_properties_id_fk": { + "name": "property_rooms_property_id_properties_id_fk", + "tableFrom": "property_rooms", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "property_rooms_floor_id_property_floors_id_fk": { + "name": "property_rooms_floor_id_property_floors_id_fk", + "tableFrom": "property_rooms", + "tableTo": "property_floors", + "columnsFrom": [ + "floor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0011_snapshot.json b/drizzle/meta/0011_snapshot.json new file mode 100644 index 0000000..d583ebd --- /dev/null +++ b/drizzle/meta/0011_snapshot.json @@ -0,0 +1,4127 @@ +{ + "id": "29f1f012-37e3-454e-a5e9-22dcd36f719e", + "prevId": "58cedf4a-b57c-479a-a0da-1780975332d6", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.property_accounts": { + "name": "property_accounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "account_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "account_number": { + "name": "account_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "meter_number": { + "name": "meter_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "accounts_by_property": { + "name": "accounts_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_accounts_property_id_properties_id_fk": { + "name": "property_accounts_property_id_properties_id_fk", + "tableFrom": "property_accounts", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_room_id": { + "name": "current_room_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_room": { + "name": "assets_by_room", + "columns": [ + { + "expression": "current_room_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_room_id_property_rooms_id_fk": { + "name": "assets_current_room_id_property_rooms_id_fk", + "tableFrom": "assets", + "tableTo": "property_rooms", + "columnsFrom": [ + "current_room_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "wiki_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "current_revision_id": { + "name": "current_revision_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_by_scope": { + "name": "wiki_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_company_id_companies_id_fk": { + "name": "wiki_pages_company_id_companies_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_pages_created_by_users_id_fk": { + "name": "wiki_pages_created_by_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "page_id": { + "name": "page_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_tsv": { + "name": "body_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "edited_by": { + "name": "edited_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "comment": { + "name": "comment", + "type": "varchar(500)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_rev_page_rev_uq": { + "name": "wiki_rev_page_rev_uq", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_rev_by_page": { + "name": "wiki_rev_by_page", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_revisions_edited_by_users_id_fk": { + "name": "wiki_revisions_edited_by_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "edited_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_floors": { + "name": "property_floors", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "floors_by_property": { + "name": "floors_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "floors_property_label_uq": { + "name": "floors_property_label_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "label", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_floors_property_id_properties_id_fk": { + "name": "property_floors_property_id_properties_id_fk", + "tableFrom": "property_floors", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_rooms": { + "name": "property_rooms", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "floor_id": { + "name": "floor_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "rooms_by_property": { + "name": "rooms_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_by_floor": { + "name": "rooms_by_floor", + "columns": [ + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_floor_name_uq": { + "name": "rooms_floor_name_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_rooms_property_id_properties_id_fk": { + "name": "property_rooms_property_id_properties_id_fk", + "tableFrom": "property_rooms", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "property_rooms_floor_id_property_floors_id_fk": { + "name": "property_rooms_floor_id_property_floors_id_fk", + "tableFrom": "property_rooms", + "tableTo": "property_floors", + "columnsFrom": [ + "floor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.account_kind": { + "name": "account_kind", + "schema": "public", + "values": [ + "water", + "electricity", + "gas", + "internet", + "phone", + "cable", + "waste", + "other" + ] + }, + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0012_snapshot.json b/drizzle/meta/0012_snapshot.json new file mode 100644 index 0000000..0a52c30 --- /dev/null +++ b/drizzle/meta/0012_snapshot.json @@ -0,0 +1,4127 @@ +{ + "id": "cf78f290-c604-42a9-be33-ec3b8b0db1e9", + "prevId": "29f1f012-37e3-454e-a5e9-22dcd36f719e", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.property_accounts": { + "name": "property_accounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "account_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "account_number": { + "name": "account_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "meter_number": { + "name": "meter_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "accounts_by_property": { + "name": "accounts_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_accounts_property_id_properties_id_fk": { + "name": "property_accounts_property_id_properties_id_fk", + "tableFrom": "property_accounts", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_room_id": { + "name": "current_room_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_room": { + "name": "assets_by_room", + "columns": [ + { + "expression": "current_room_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_room_id_property_rooms_id_fk": { + "name": "assets_current_room_id_property_rooms_id_fk", + "tableFrom": "assets", + "tableTo": "property_rooms", + "columnsFrom": [ + "current_room_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "wiki_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "current_revision_id": { + "name": "current_revision_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_by_scope": { + "name": "wiki_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_company_id_companies_id_fk": { + "name": "wiki_pages_company_id_companies_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_pages_created_by_users_id_fk": { + "name": "wiki_pages_created_by_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "page_id": { + "name": "page_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_tsv": { + "name": "body_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "edited_by": { + "name": "edited_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "comment": { + "name": "comment", + "type": "varchar(500)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_rev_page_rev_uq": { + "name": "wiki_rev_page_rev_uq", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_rev_by_page": { + "name": "wiki_rev_by_page", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_revisions_edited_by_users_id_fk": { + "name": "wiki_revisions_edited_by_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "edited_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_floors": { + "name": "property_floors", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "floors_by_property": { + "name": "floors_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "floors_property_label_uq": { + "name": "floors_property_label_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "label", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_floors_property_id_properties_id_fk": { + "name": "property_floors_property_id_properties_id_fk", + "tableFrom": "property_floors", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_rooms": { + "name": "property_rooms", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "floor_id": { + "name": "floor_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "rooms_by_property": { + "name": "rooms_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_by_floor": { + "name": "rooms_by_floor", + "columns": [ + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_floor_name_uq": { + "name": "rooms_floor_name_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_rooms_property_id_properties_id_fk": { + "name": "property_rooms_property_id_properties_id_fk", + "tableFrom": "property_rooms", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "property_rooms_floor_id_property_floors_id_fk": { + "name": "property_rooms_floor_id_property_floors_id_fk", + "tableFrom": "property_rooms", + "tableTo": "property_floors", + "columnsFrom": [ + "floor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.account_kind": { + "name": "account_kind", + "schema": "public", + "values": [ + "water", + "electricity", + "gas", + "internet", + "phone", + "cable", + "waste", + "other" + ] + }, + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/0013_snapshot.json b/drizzle/meta/0013_snapshot.json new file mode 100644 index 0000000..aa1554a --- /dev/null +++ b/drizzle/meta/0013_snapshot.json @@ -0,0 +1,4311 @@ +{ + "id": "aa553ee3-1697-4639-ae6a-25520e125ba3", + "prevId": "cf78f290-c604-42a9-be33-ec3b8b0db1e9", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.property_accounts": { + "name": "property_accounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "account_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "account_number": { + "name": "account_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "meter_number": { + "name": "meter_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "accounts_by_property": { + "name": "accounts_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_accounts_property_id_properties_id_fk": { + "name": "property_accounts_property_id_properties_id_fk", + "tableFrom": "property_accounts", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_field_defs": { + "name": "asset_field_defs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "enum_values": { + "name": "enum_values", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "unit": { + "name": "unit", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "help_text": { + "name": "help_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deprecated_at": { + "name": "deprecated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_field_defs_type_key_uq": { + "name": "asset_field_defs_type_key_uq", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_field_defs_by_type": { + "name": "asset_field_defs_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_field_defs_asset_type_id_asset_types_id_fk": { + "name": "asset_field_defs_asset_type_id_asset_types_id_fk", + "tableFrom": "asset_field_defs", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_location_history": { + "name": "asset_location_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "from_kind": { + "name": "from_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_project_id": { + "name": "from_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "from_property_id": { + "name": "from_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_kind": { + "name": "to_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "to_project_id": { + "name": "to_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "to_property_id": { + "name": "to_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_by": { + "name": "moved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "moved_at": { + "name": "moved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alh_by_asset": { + "name": "alh_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "moved_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_location_history_asset_id_assets_id_fk": { + "name": "asset_location_history_asset_id_assets_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_location_history_from_project_id_projects_id_fk": { + "name": "asset_location_history_from_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "from_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_from_property_id_properties_id_fk": { + "name": "asset_location_history_from_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "from_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_project_id_projects_id_fk": { + "name": "asset_location_history_to_project_id_projects_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "projects", + "columnsFrom": [ + "to_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_to_property_id_properties_id_fk": { + "name": "asset_location_history_to_property_id_properties_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "properties", + "columnsFrom": [ + "to_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "asset_location_history_moved_by_users_id_fk": { + "name": "asset_location_history_moved_by_users_id_fk", + "tableFrom": "asset_location_history", + "tableTo": "users", + "columnsFrom": [ + "moved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_logs": { + "name": "asset_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_logs_by_asset": { + "name": "asset_logs_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_logs_asset_id_assets_id_fk": { + "name": "asset_logs_asset_id_assets_id_fk", + "tableFrom": "asset_logs", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "asset_logs_author_id_users_id_fk": { + "name": "asset_logs_author_id_users_id_fk", + "tableFrom": "asset_logs", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.asset_types": { + "name": "asset_types", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema_version": { + "name": "schema_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "asset_types_company_slug_uq": { + "name": "asset_types_company_slug_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "asset_types_by_parent": { + "name": "asset_types_by_parent", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "asset_types_company_id_companies_id_fk": { + "name": "asset_types_company_id_companies_id_fk", + "tableFrom": "asset_types", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "asset_type_id": { + "name": "asset_type_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "serial_number": { + "name": "serial_number", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "manufacturer": { + "name": "manufacturer", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "purchased_at": { + "name": "purchased_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "current_container_kind": { + "name": "current_container_kind", + "type": "container_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "current_project_id": { + "name": "current_project_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_property_id": { + "name": "current_property_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "current_room_id": { + "name": "current_room_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "custom_fields": { + "name": "custom_fields", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "search_tsv": { + "name": "search_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_by_company": { + "name": "assets_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_type": { + "name": "assets_by_type", + "columns": [ + { + "expression": "asset_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_project": { + "name": "assets_by_project", + "columns": [ + { + "expression": "current_project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_property": { + "name": "assets_by_property", + "columns": [ + { + "expression": "current_property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_by_room": { + "name": "assets_by_room", + "columns": [ + { + "expression": "current_room_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_tag_uq": { + "name": "assets_company_tag_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_company_serial_uq": { + "name": "assets_company_serial_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "serial_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_company_id_companies_id_fk": { + "name": "assets_company_id_companies_id_fk", + "tableFrom": "assets", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_asset_type_id_asset_types_id_fk": { + "name": "assets_asset_type_id_asset_types_id_fk", + "tableFrom": "assets", + "tableTo": "asset_types", + "columnsFrom": [ + "asset_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_project_id_projects_id_fk": { + "name": "assets_current_project_id_projects_id_fk", + "tableFrom": "assets", + "tableTo": "projects", + "columnsFrom": [ + "current_project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_property_id_properties_id_fk": { + "name": "assets_current_property_id_properties_id_fk", + "tableFrom": "assets", + "tableTo": "properties", + "columnsFrom": [ + "current_property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "assets_current_room_id_property_rooms_id_fk": { + "name": "assets_current_room_id_property_rooms_id_fk", + "tableFrom": "assets", + "tableTo": "property_rooms", + "columnsFrom": [ + "current_room_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assets_created_by_users_id_fk": { + "name": "assets_created_by_users_id_fk", + "tableFrom": "assets", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_instances": { + "name": "checklist_instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "scope_type": { + "name": "scope_type", + "type": "checklist_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ci_by_scope": { + "name": "ci_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ci_by_company": { + "name": "ci_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_instances_company_id_companies_id_fk": { + "name": "checklist_instances_company_id_companies_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_instances_template_id_checklist_templates_id_fk": { + "name": "checklist_instances_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "checklist_instances_created_by_users_id_fk": { + "name": "checklist_instances_created_by_users_id_fk", + "tableFrom": "checklist_instances", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_items": { + "name": "checklist_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "instance_id": { + "name": "instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "done_at": { + "name": "done_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "done_by": { + "name": "done_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "cit_by_instance": { + "name": "cit_by_instance", + "columns": [ + { + "expression": "instance_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_items_instance_id_checklist_instances_id_fk": { + "name": "checklist_items_instance_id_checklist_instances_id_fk", + "tableFrom": "checklist_items", + "tableTo": "checklist_instances", + "columnsFrom": [ + "instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_items_done_by_users_id_fk": { + "name": "checklist_items_done_by_users_id_fk", + "tableFrom": "checklist_items", + "tableTo": "users", + "columnsFrom": [ + "done_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_template_items": { + "name": "checklist_template_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "cti_by_template": { + "name": "cti_by_template", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_template_items_template_id_checklist_templates_id_fk": { + "name": "checklist_template_items_template_id_checklist_templates_id_fk", + "tableFrom": "checklist_template_items", + "tableTo": "checklist_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.checklist_templates": { + "name": "checklist_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ct_by_company": { + "name": "ct_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "checklist_templates_company_id_companies_id_fk": { + "name": "checklist_templates_company_id_companies_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "checklist_templates_created_by_users_id_fk": { + "name": "checklist_templates_created_by_users_id_fk", + "tableFrom": "checklist_templates", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.decision_events": { + "name": "decision_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "decision_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "alternatives_considered": { + "name": "alternatives_considered", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cost_impact": { + "name": "cost_impact", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "currency": { + "name": "currency", + "type": "varchar(3)", + "primaryKey": false, + "notNull": false + }, + "approved_by": { + "name": "approved_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "decided_by": { + "name": "decided_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "de_by_scope": { + "name": "de_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "decided_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_by_company": { + "name": "de_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "de_tags_gin": { + "name": "de_tags_gin", + "columns": [ + { + "expression": "tags", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "decision_events_company_id_companies_id_fk": { + "name": "decision_events_company_id_companies_id_fk", + "tableFrom": "decision_events", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "decision_events_approved_by_users_id_fk": { + "name": "decision_events_approved_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "approved_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "decision_events_decided_by_users_id_fk": { + "name": "decision_events_decided_by_users_id_fk", + "tableFrom": "decision_events", + "tableTo": "users", + "columnsFrom": [ + "decided_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "doc_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "sha256": { + "name": "sha256", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "varchar(512)", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_by_scope": { + "name": "docs_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_company": { + "name": "docs_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_by_hash": { + "name": "docs_by_hash", + "columns": [ + { + "expression": "sha256", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_storage_key_uq": { + "name": "docs_storage_key_uq", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "documents_company_id_companies_id_fk": { + "name": "documents_company_id_companies_id_fk", + "tableFrom": "documents", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "documents_uploaded_by_users_id_fk": { + "name": "documents_uploaded_by_users_id_fk", + "tableFrom": "documents", + "tableTo": "users", + "columnsFrom": [ + "uploaded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "settings_json": { + "name": "settings_json", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "companies_slug_unique": { + "name": "companies_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.company_users": { + "name": "company_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "company_users_uq": { + "name": "company_users_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "company_users_by_user": { + "name": "company_users_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "company_users_company_id_companies_id_fk": { + "name": "company_users_company_id_companies_id_fk", + "tableFrom": "company_users", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "company_users_user_id_users_id_fk": { + "name": "company_users_user_id_users_id_fk", + "tableFrom": "company_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(128)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "active_company_id": { + "name": "active_company_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_by_user": { + "name": "sessions_by_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_by_expiry": { + "name": "sessions_by_expiry", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sessions_active_company_id_companies_id_fk": { + "name": "sessions_active_company_id_companies_id_fk", + "tableFrom": "sessions", + "tableTo": "companies", + "columnsFrom": [ + "active_company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "email_normalized": { + "name": "email_normalized", + "type": "varchar(320)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_subject": { + "name": "oidc_subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "oidc_issuer": { + "name": "oidc_issuer", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_login_at": { + "name": "last_login_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "email_notifications": { + "name": "email_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "matrix_notifications": { + "name": "matrix_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "matrix_user_id": { + "name": "matrix_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_email_norm_uq": { + "name": "users_email_norm_uq", + "columns": [ + { + "expression": "email_normalized", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_oidc_uq": { + "name": "users_oidc_uq", + "columns": [ + { + "expression": "oidc_issuer", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "oidc_subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.properties": { + "name": "properties", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "address_line1": { + "name": "address_line1", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "address_line2": { + "name": "address_line2", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "city": { + "name": "city", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "region": { + "name": "region", + "type": "varchar(128)", + "primaryKey": false, + "notNull": false + }, + "postal_code": { + "name": "postal_code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "country_code": { + "name": "country_code", + "type": "varchar(2)", + "primaryKey": false, + "notNull": false + }, + "lat": { + "name": "lat", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "lng": { + "name": "lng", + "type": "numeric(9, 6)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "properties_by_company": { + "name": "properties_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "properties_company_id_companies_id_fk": { + "name": "properties_company_id_companies_id_fk", + "tableFrom": "properties", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "properties_created_by_users_id_fk": { + "name": "properties_created_by_users_id_fk", + "tableFrom": "properties", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_floors": { + "name": "property_floors", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "floors_by_property": { + "name": "floors_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "floors_property_label_uq": { + "name": "floors_property_label_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "label", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_floors_property_id_properties_id_fk": { + "name": "property_floors_property_id_properties_id_fk", + "tableFrom": "property_floors", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.property_rooms": { + "name": "property_rooms", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "property_id": { + "name": "property_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "floor_id": { + "name": "floor_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "rooms_by_property": { + "name": "rooms_by_property", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_by_floor": { + "name": "rooms_by_floor", + "columns": [ + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "rooms_floor_name_uq": { + "name": "rooms_floor_name_uq", + "columns": [ + { + "expression": "property_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "floor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "property_rooms_property_id_properties_id_fk": { + "name": "property_rooms_property_id_properties_id_fk", + "tableFrom": "property_rooms", + "tableTo": "properties", + "columnsFrom": [ + "property_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "property_rooms_floor_id_property_floors_id_fk": { + "name": "property_rooms_floor_id_property_floors_id_fk", + "tableFrom": "property_rooms", + "tableTo": "property_floors", + "columnsFrom": [ + "floor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_events": { + "name": "maintenance_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "performed_at": { + "name": "performed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "performed_by": { + "name": "performed_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_reading": { + "name": "usage_reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_instance_id": { + "name": "checklist_instance_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "me_by_asset_time": { + "name": "me_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "performed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "me_by_schedule": { + "name": "me_by_schedule", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_events_asset_id_assets_id_fk": { + "name": "maintenance_events_asset_id_assets_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_events_schedule_id_maintenance_schedules_id_fk": { + "name": "maintenance_events_schedule_id_maintenance_schedules_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "maintenance_schedules", + "columnsFrom": [ + "schedule_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_performed_by_users_id_fk": { + "name": "maintenance_events_performed_by_users_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "users", + "columnsFrom": [ + "performed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_events_checklist_instance_id_checklist_instances_id_fk": { + "name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk", + "tableFrom": "maintenance_events", + "tableTo": "checklist_instances", + "columnsFrom": [ + "checklist_instance_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maintenance_schedules": { + "name": "maintenance_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "schedule_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "interval_value": { + "name": "interval_value", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interval_unit": { + "name": "interval_unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "last_serviced_at": { + "name": "last_serviced_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "next_due_usage": { + "name": "next_due_usage", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": false + }, + "checklist_template_id": { + "name": "checklist_template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ms_by_asset": { + "name": "ms_by_asset", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ms_by_next_due": { + "name": "ms_by_next_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maintenance_schedules_asset_id_assets_id_fk": { + "name": "maintenance_schedules_asset_id_assets_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "maintenance_schedules_checklist_template_id_checklist_templates_id_fk": { + "name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "checklist_templates", + "columnsFrom": [ + "checklist_template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "maintenance_schedules_created_by_users_id_fk": { + "name": "maintenance_schedules_created_by_users_id_fk", + "tableFrom": "maintenance_schedules", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_readings": { + "name": "usage_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "asset_id": { + "name": "asset_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "reading": { + "name": "reading", + "type": "numeric(18, 4)", + "primaryKey": false, + "notNull": true + }, + "unit": { + "name": "unit", + "type": "interval_unit", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "recorded_at": { + "name": "recorded_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "recorded_by": { + "name": "recorded_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ur_by_asset_time": { + "name": "ur_by_asset_time", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "recorded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_readings_asset_id_assets_id_fk": { + "name": "usage_readings_asset_id_assets_id_fk", + "tableFrom": "usage_readings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_readings_recorded_by_users_id_fk": { + "name": "usage_readings_recorded_by_users_id_fk", + "tableFrom": "usage_readings", + "tableTo": "users", + "columnsFrom": [ + "recorded_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(64)", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "start_date": { + "name": "start_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "projects_by_company": { + "name": "projects_by_company", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_company_code_uq": { + "name": "projects_company_code_uq", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_company_id_companies_id_fk": { + "name": "projects_company_id_companies_id_fk", + "tableFrom": "projects", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "projects_created_by_users_id_fk": { + "name": "projects_created_by_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subtasks": { + "name": "subtasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "task_id": { + "name": "task_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(500)", + "primaryKey": false, + "notNull": true + }, + "done": { + "name": "done", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "subtasks_by_task": { + "name": "subtasks_by_task", + "columns": [ + { + "expression": "task_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "subtasks_task_id_tasks_id_fk": { + "name": "subtasks_task_id_tasks_id_fk", + "tableFrom": "subtasks", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "work_package_id": { + "name": "work_package_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "task_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'todo'" + }, + "assignee_id": { + "name": "assignee_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "due_at": { + "name": "due_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tasks_by_wp": { + "name": "tasks_by_wp", + "columns": [ + { + "expression": "work_package_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_by_assignee": { + "name": "tasks_by_assignee", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tasks_status_due": { + "name": "tasks_status_due", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tasks_work_package_id_work_packages_id_fk": { + "name": "tasks_work_package_id_work_packages_id_fk", + "tableFrom": "tasks", + "tableTo": "work_packages", + "columnsFrom": [ + "work_package_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tasks_assignee_id_users_id_fk": { + "name": "tasks_assignee_id_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tasks_created_by_users_id_fk": { + "name": "tasks_created_by_users_id_fk", + "tableFrom": "tasks", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.work_packages": { + "name": "work_packages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_id": { + "name": "project_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "work_packages_by_project": { + "name": "work_packages_by_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "work_packages_project_id_projects_id_fk": { + "name": "work_packages_project_id_projects_id_fk", + "tableFrom": "work_packages", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "scope_type": { + "name": "scope_type", + "type": "wiki_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar(128)", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "current_revision_id": { + "name": "current_revision_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_by_scope": { + "name": "wiki_by_scope", + "columns": [ + { + "expression": "scope_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_company_id_companies_id_fk": { + "name": "wiki_pages_company_id_companies_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_pages_created_by_users_id_fk": { + "name": "wiki_pages_created_by_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "page_id": { + "name": "page_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body_md": { + "name": "body_md", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_tsv": { + "name": "body_tsv", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "edited_by": { + "name": "edited_by", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "comment": { + "name": "comment", + "type": "varchar(500)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_rev_page_rev_uq": { + "name": "wiki_rev_page_rev_uq", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_rev_by_page": { + "name": "wiki_rev_by_page", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "revision", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "wiki_revisions_edited_by_users_id_fk": { + "name": "wiki_revisions_edited_by_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "edited_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notifications": { + "name": "notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "company_id": { + "name": "company_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "notification_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "link": { + "name": "link", + "type": "varchar(1024)", + "primaryKey": false, + "notNull": false + }, + "read_at": { + "name": "read_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "notifications_by_user_unread": { + "name": "notifications_by_user_unread", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "read_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "notifications_by_user_company": { + "name": "notifications_by_user_company", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "notifications_user_id_users_id_fk": { + "name": "notifications_user_id_users_id_fk", + "tableFrom": "notifications", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "notifications_company_id_companies_id_fk": { + "name": "notifications_company_id_companies_id_fk", + "tableFrom": "notifications", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.account_kind": { + "name": "account_kind", + "schema": "public", + "values": [ + "water", + "electricity", + "gas", + "internet", + "phone", + "cable", + "waste", + "other" + ] + }, + "public.audit_action": { + "name": "audit_action", + "schema": "public", + "values": [ + "create", + "update", + "delete", + "move", + "assign", + "complete", + "login", + "logout" + ] + }, + "public.checklist_scope": { + "name": "checklist_scope", + "schema": "public", + "values": [ + "task", + "subtask", + "maintenance_event", + "ad_hoc" + ] + }, + "public.container_kind": { + "name": "container_kind", + "schema": "public", + "values": [ + "project", + "property" + ] + }, + "public.decision_scope": { + "name": "decision_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package" + ] + }, + "public.doc_scope": { + "name": "doc_scope", + "schema": "public", + "values": [ + "project", + "property", + "asset", + "work_package", + "decision_event" + ] + }, + "public.field_type": { + "name": "field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "int", + "float", + "bool", + "date", + "ip", + "cidr", + "mac", + "enum", + "multi_enum", + "url", + "email", + "asset_ref" + ] + }, + "public.interval_unit": { + "name": "interval_unit", + "schema": "public", + "values": [ + "days", + "months", + "years", + "hours", + "cycles", + "km" + ] + }, + "public.notification_kind": { + "name": "notification_kind", + "schema": "public", + "values": [ + "task_assigned", + "asset_log_added", + "asset_moved", + "decision_created", + "maintenance_event_recorded", + "generic" + ] + }, + "public.role": { + "name": "role", + "schema": "public", + "values": [ + "admin", + "manager", + "user", + "viewer" + ] + }, + "public.schedule_kind": { + "name": "schedule_kind", + "schema": "public", + "values": [ + "time", + "usage" + ] + }, + "public.task_status": { + "name": "task_status", + "schema": "public", + "values": [ + "todo", + "doing", + "done", + "blocked" + ] + }, + "public.wiki_scope": { + "name": "wiki_scope", + "schema": "public", + "values": [ + "global", + "project", + "property" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 1d0edcb..4038d0d 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -8,6 +8,97 @@ "when": 1776760498088, "tag": "0000_init", "breakpoints": true + }, + { + "idx": 1, + "version": "7", + "when": 1776912796532, + "tag": "0001_phase1_assets_properties_documents", + "breakpoints": true + }, + { + "idx": 2, + "version": "7", + "when": 1776912900000, + "tag": "0002_phase1_constraints_and_search", + "breakpoints": true + }, + { + "idx": 3, + "version": "7", + "when": 1776913896873, + "tag": "0003_phase2_checklists_and_maintenance", + "breakpoints": true + }, + { + "idx": 4, + "version": "7", + "when": 1776913950000, + "tag": "0004_phase2_partial_indexes_and_triggers", + "breakpoints": true + }, + { + "idx": 5, + "version": "7", + "when": 1776915278123, + "tag": "0005_phase3_projects_and_decisions", + "breakpoints": true + }, + { + "idx": 6, + "version": "7", + "when": 1776915350000, + "tag": "0006_phase3_partial_index_and_triggers", + "breakpoints": true + }, + { + "idx": 7, + "version": "7", + "when": 1776916197473, + "tag": "0007_phase4_wiki", + "breakpoints": true + }, + { + "idx": 8, + "version": "7", + "when": 1776916020000, + "tag": "0008_phase4_wiki_fts_and_uniq", + "breakpoints": true + }, + { + "idx": 9, + "version": "7", + "when": 1776918611593, + "tag": "0009_rooms_and_floors", + "breakpoints": true + }, + { + "idx": 10, + "version": "7", + "when": 1776918700000, + "tag": "0010_rooms_check_and_triggers", + "breakpoints": true + }, + { + "idx": 11, + "version": "7", + "when": 1776919853043, + "tag": "0011_property_accounts", + "breakpoints": true + }, + { + "idx": 12, + "version": "7", + "when": 1776919900000, + "tag": "0012_accounts_updated_at_trigger", + "breakpoints": true + }, + { + "idx": 13, + "version": "7", + "when": 1776930973516, + "tag": "0013_notifications", + "breakpoints": true } ] } \ No newline at end of file diff --git a/graphify-out/.graphify_chunk_01.json b/graphify-out/.graphify_chunk_01.json new file mode 100644 index 0000000..ef5746f --- /dev/null +++ b/graphify-out/.graphify_chunk_01.json @@ -0,0 +1,117 @@ +{ + "nodes": [ + {"id": "readme_buildfor_life_ops", "label": "buildfor_life_ops", "file_type": "document", "source_file": "README.md", "source_location": "L1-L3", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_buildfor_life_budget", "label": "buildfor_life_budget (sibling)", "file_type": "document", "source_file": "README.md", "source_location": "L4,L178", "source_url": "https://git.b4l.co.th/B4L/buildfor_life_budget", "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_buildfor_life_repair", "label": "buildfor_life_repair (sibling)", "file_type": "document", "source_file": "README.md", "source_location": "L4,L179", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_stack_sveltekit5", "label": "SvelteKit 5 (adapter-node)", "file_type": "document", "source_file": "README.md", "source_location": "L8", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_stack_tailwind_v4", "label": "Tailwind v4 + @theme inline tokens", "file_type": "document", "source_file": "README.md", "source_location": "L9", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_stack_postgres_drizzle", "label": "PostgreSQL 16+ via Drizzle ORM + Zod", "file_type": "document", "source_file": "README.md", "source_location": "L10", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_auth_argon2id", "label": "Argon2id sessions (@node-rs/argon2 + @oslojs/crypto)", "file_type": "document", "source_file": "README.md", "source_location": "L11", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_easymde", "label": "EasyMDE markdown editor", "file_type": "document", "source_file": "README.md", "source_location": "L12", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_sharp", "label": "Sharp image thumbnails", "file_type": "document", "source_file": "README.md", "source_location": "L12", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_storage_adapter", "label": "StorageAdapter interface", "file_type": "document", "source_file": "README.md", "source_location": "L13", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_local_disk_storage", "label": "LocalDiskStorage", "file_type": "document", "source_file": "README.md", "source_location": "L13,L143", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_s3_storage", "label": "S3Storage (future)", "file_type": "document", "source_file": "README.md", "source_location": "L144", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_env_dotenv", "label": ".env configuration", "file_type": "document", "source_file": "README.md", "source_location": "L29-L44", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_create_user_script", "label": "npm run create-user script", "file_type": "document", "source_file": "README.md", "source_location": "L59-L66,L122", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_db_migrate", "label": "npm run db:migrate", "file_type": "document", "source_file": "README.md", "source_location": "L54,L86", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_db_generate", "label": "npm run db:generate", "file_type": "document", "source_file": "README.md", "source_location": "L85", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_db_push", "label": "npm run db:push (dev only)", "file_type": "document", "source_file": "README.md", "source_location": "L87", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_db_studio", "label": "npm run db:studio (Drizzle Studio)", "file_type": "document", "source_file": "README.md", "source_location": "L88", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_db_seed", "label": "npm run db:seed", "file_type": "document", "source_file": "README.md", "source_location": "L89", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_validate_script", "label": "npm run validate (check + build)", "file_type": "document", "source_file": "README.md", "source_location": "L84", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_auth_model", "label": "Auth model (sessions + hashed cookies)", "file_type": "document", "source_file": "README.md", "source_location": "L132-L138", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_sliding_renewal", "label": "Sliding session renewal (30d/15d)", "file_type": "document", "source_file": "README.md", "source_location": "L135", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_sha256_cookie_hash", "label": "SHA-256 cookie hashing before DB lookup", "file_type": "document", "source_file": "README.md", "source_location": "L134", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_company_users", "label": "company_users role mapping", "file_type": "document", "source_file": "README.md", "source_location": "L138", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_storage_model", "label": "Storage model (opaque storage_key)", "file_type": "document", "source_file": "README.md", "source_location": "L141-L144", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_hmac_signed_urls", "label": "HMAC-signed short-lived file URLs", "file_type": "document", "source_file": "README.md", "source_location": "L143", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_api_files_route", "label": "/api/files route (signature verification + streaming)", "file_type": "document", "source_file": "README.md", "source_location": "L120,L143", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_layout_app_group", "label": "(app) route group (authed shell)", "file_type": "document", "source_file": "README.md", "source_location": "L113-L116,L137", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_layout_auth_group", "label": "(auth) route group (login shell)", "file_type": "document", "source_file": "README.md", "source_location": "L117-L118", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_hooks_server", "label": "hooks.server.ts (session validation)", "file_type": "document", "source_file": "README.md", "source_location": "L99", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_env_ts", "label": "env.ts (Zod-validated process.env)", "file_type": "document", "source_file": "README.md", "source_location": "L108", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_db_schema_dir", "label": "src/lib/server/db/schema/", "file_type": "document", "source_file": "README.md", "source_location": "L105-L106", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_roadmap_phase0", "label": "Phase 0: scaffold (shipped)", "file_type": "document", "source_file": "README.md", "source_location": "L150", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_roadmap_phase1", "label": "Phase 1: Properties + Assets", "file_type": "document", "source_file": "README.md", "source_location": "L151", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_roadmap_phase2", "label": "Phase 2: Checklists + maintenance", "file_type": "document", "source_file": "README.md", "source_location": "L152", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_roadmap_phase3", "label": "Phase 3: Projects + structured decisions", "file_type": "document", "source_file": "README.md", "source_location": "L153", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_roadmap_phase4", "label": "Phase 4: Wiki + FTS", "file_type": "document", "source_file": "README.md", "source_location": "L154", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_roadmap_phase5", "label": "Phase 5: QR, notifications, S3", "file_type": "document", "source_file": "README.md", "source_location": "L155", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_uuidv7", "label": "Decision: UUID v7 primary keys", "file_type": "document", "source_file": "README.md", "source_location": "L161", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_timestamptz", "label": "Decision: timestamptz UTC everywhere", "file_type": "document", "source_file": "README.md", "source_location": "L162", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_soft_delete", "label": "Decision: soft delete (deleted_at)", "file_type": "document", "source_file": "README.md", "source_location": "L163", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_money_type", "label": "Decision: numeric(18,4) + char(3) currency", "file_type": "document", "source_file": "README.md", "source_location": "L164", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_jsonb_custom_fields", "label": "Decision: JSONB custom fields + asset_field_defs", "file_type": "document", "source_file": "README.md", "source_location": "L165", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_xor_location", "label": "Decision: XOR asset location (project XOR property)", "file_type": "document", "source_file": "README.md", "source_location": "L166", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_asset_history", "label": "Decision: asset_location_history (movable assets)", "file_type": "document", "source_file": "README.md", "source_location": "L167", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_immutable_keys", "label": "Decision: immutable custom-field keys", "file_type": "document", "source_file": "README.md", "source_location": "L168", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_decision_scope", "label": "Decision: decisions scoped to project/property/asset/work_package", "file_type": "document", "source_file": "README.md", "source_location": "L169", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_currency_default", "label": "Decision: company default currency in settings_json", "file_type": "document", "source_file": "README.md", "source_location": "L170", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_tabs_routes", "label": "Decision: tabs = nested routes (not query-string)", "file_type": "document", "source_file": "README.md", "source_location": "L171", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "readme_decision_theme_key", "label": "Decision: localStorage['theme'] key shared across siblings", "file_type": "document", "source_file": "README.md", "source_location": "L172", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "drizzle_readme_migrations", "label": "Drizzle migrations directory", "file_type": "document", "source_file": "drizzle/README.md", "source_location": "L1-L5", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "drizzle_readme_review_rationale", "label": "Review SQL after generate: enum/index/custom_fields", "file_type": "document", "source_file": "drizzle/README.md", "source_location": "L13-L18", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "drizzle_readme_concurrently_note", "label": "Use CONCURRENTLY on large-table index changes", "file_type": "document", "source_file": "drizzle/README.md", "source_location": "L16", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "drizzle_readme_immutable_key_ref", "label": "Immutable-key policy reference", "file_type": "document", "source_file": "drizzle/README.md", "source_location": "L17-L18", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "apphtml_root", "label": "app.html root document", "file_type": "code", "source_file": "src/app.html", "source_location": "L1-L20", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "apphtml_theme_bootstrap", "label": "Dark-mode bootstrap inline script (localStorage['theme'])", "file_type": "code", "source_file": "src/app.html", "source_location": "L7-L14", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "apphtml_sveltekit_placeholders", "label": "%sveltekit.head% / %sveltekit.body% placeholders", "file_type": "code", "source_file": "src/app.html", "source_location": "L15,L18", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "apphtml_tailwind_body_classes", "label": "Tailwind body classes with dark: variants", "file_type": "code", "source_file": "src/app.html", "source_location": "L17", "source_url": null, "captured_at": null, "author": null, "contributor": null}, + {"id": "apphtml_preload_hover", "label": "data-sveltekit-preload-data=hover", "file_type": "code", "source_file": "src/app.html", "source_location": "L17", "source_url": null, "captured_at": null, "author": null, "contributor": null} + ], + "edges": [ + {"source": "readme_buildfor_life_ops", "target": "readme_buildfor_life_budget", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L4", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_buildfor_life_repair", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L4", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_stack_sveltekit5", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L8", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_stack_tailwind_v4", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L9", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_stack_postgres_drizzle", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L10", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_auth_argon2id", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L11", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_easymde", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L12", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_sharp", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L12", "weight": 1.0}, + {"source": "readme_storage_adapter", "target": "readme_local_disk_storage", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L13", "weight": 1.0}, + {"source": "readme_storage_adapter", "target": "readme_s3_storage", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L144", "weight": 1.0}, + {"source": "readme_local_disk_storage", "target": "readme_hmac_signed_urls", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L143", "weight": 1.0}, + {"source": "readme_api_files_route", "target": "readme_hmac_signed_urls", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L120,L143", "weight": 1.0}, + {"source": "readme_api_files_route", "target": "readme_local_disk_storage", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L120", "weight": 1.0}, + {"source": "readme_storage_model", "target": "readme_storage_adapter", "relation": "rationale_for", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L141-L144", "weight": 1.0}, + {"source": "readme_auth_model", "target": "readme_sha256_cookie_hash", "relation": "rationale_for", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L134", "weight": 1.0}, + {"source": "readme_auth_model", "target": "readme_sliding_renewal", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L135", "weight": 1.0}, + {"source": "readme_auth_model", "target": "readme_company_users", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L138", "weight": 1.0}, + {"source": "readme_hooks_server", "target": "readme_auth_model", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L99,L135", "weight": 1.0}, + {"source": "readme_layout_app_group", "target": "readme_auth_model", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L137", "weight": 1.0}, + {"source": "readme_env_dotenv", "target": "readme_env_ts", "relation": "shares_data_with", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L108,L183", "weight": 1.0}, + {"source": "readme_create_user_script", "target": "readme_db_schema_dir", "relation": "shares_data_with", "confidence": "INFERRED", "confidence_score": 0.8, "source_file": "README.md", "source_location": "L122", "weight": 1.0}, + {"source": "readme_db_migrate", "target": "drizzle_readme_migrations", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "drizzle/README.md", "source_location": "L9", "weight": 1.0}, + {"source": "readme_db_generate", "target": "drizzle_readme_migrations", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "drizzle/README.md", "source_location": "L8", "weight": 1.0}, + {"source": "readme_db_push", "target": "drizzle_readme_migrations", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "drizzle/README.md", "source_location": "L10", "weight": 1.0}, + {"source": "readme_db_studio", "target": "drizzle_readme_migrations", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "drizzle/README.md", "source_location": "L11", "weight": 1.0}, + {"source": "drizzle_readme_review_rationale", "target": "drizzle_readme_migrations", "relation": "rationale_for", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "drizzle/README.md", "source_location": "L13-L18", "weight": 1.0}, + {"source": "drizzle_readme_concurrently_note", "target": "drizzle_readme_review_rationale", "relation": "rationale_for", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "drizzle/README.md", "source_location": "L16", "weight": 1.0}, + {"source": "drizzle_readme_immutable_key_ref", "target": "readme_decision_immutable_keys", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "drizzle/README.md", "source_location": "L17-L18", "weight": 1.0}, + {"source": "readme_decision_jsonb_custom_fields", "target": "readme_decision_immutable_keys", "relation": "conceptually_related_to", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L165,L168", "weight": 1.0}, + {"source": "readme_decision_xor_location", "target": "readme_decision_asset_history", "relation": "conceptually_related_to", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L166-L167", "weight": 1.0}, + {"source": "readme_roadmap_phase5", "target": "readme_s3_storage", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L155", "weight": 1.0}, + {"source": "readme_roadmap_phase3", "target": "readme_decision_decision_scope", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L153,L169", "weight": 1.0}, + {"source": "readme_roadmap_phase4", "target": "readme_easymde", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L154,L12", "weight": 1.0}, + {"source": "readme_roadmap_phase1", "target": "readme_decision_jsonb_custom_fields", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L151,L165", "weight": 1.0}, + {"source": "apphtml_root", "target": "apphtml_theme_bootstrap", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "src/app.html", "source_location": "L7-L14", "weight": 1.0}, + {"source": "apphtml_root", "target": "apphtml_sveltekit_placeholders", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "src/app.html", "source_location": "L15,L18", "weight": 1.0}, + {"source": "apphtml_root", "target": "apphtml_tailwind_body_classes", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "src/app.html", "source_location": "L17", "weight": 1.0}, + {"source": "apphtml_root", "target": "apphtml_preload_hover", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "src/app.html", "source_location": "L17", "weight": 1.0}, + {"source": "apphtml_theme_bootstrap", "target": "readme_decision_theme_key", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L172", "weight": 1.0}, + {"source": "apphtml_tailwind_body_classes", "target": "readme_stack_tailwind_v4", "relation": "implements", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L9,L17", "weight": 1.0}, + {"source": "apphtml_root", "target": "readme_stack_sveltekit5", "relation": "implements", "confidence": "INFERRED", "confidence_score": 0.9, "source_file": "src/app.html", "source_location": "L1-L20", "weight": 1.0}, + {"source": "readme_decision_theme_key", "target": "apphtml_theme_bootstrap", "relation": "rationale_for", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "README.md", "source_location": "L172", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_buildfor_life_budget", "relation": "semantically_similar_to", "confidence": "INFERRED", "confidence_score": 0.85, "source_file": "README.md", "source_location": "L4,L178", "weight": 1.0}, + {"source": "readme_buildfor_life_ops", "target": "readme_buildfor_life_repair", "relation": "semantically_similar_to", "confidence": "INFERRED", "confidence_score": 0.85, "source_file": "README.md", "source_location": "L4,L179", "weight": 1.0}, + {"source": "readme_local_disk_storage", "target": "readme_s3_storage", "relation": "semantically_similar_to", "confidence": "INFERRED", "confidence_score": 0.9, "source_file": "README.md", "source_location": "L13,L144", "weight": 1.0} + ], + "hyperedges": [ + {"id": "auth_session_flow", "label": "Session auth flow (cookie, hash, hook, gate)", "nodes": ["readme_auth_model", "readme_sha256_cookie_hash", "readme_sliding_renewal", "readme_hooks_server", "readme_layout_app_group"], "relation": "participate_in", "confidence": "EXTRACTED", "confidence_score": 0.95, "source_file": "README.md"}, + {"id": "storage_abstraction_stack", "label": "Storage abstraction (adapter, local impl, signed URLs, file route)", "nodes": ["readme_storage_adapter", "readme_local_disk_storage", "readme_hmac_signed_urls", "readme_api_files_route", "readme_storage_model"], "relation": "implement", "confidence": "EXTRACTED", "confidence_score": 0.95, "source_file": "README.md"}, + {"id": "theme_propagation_pattern", "label": "Cross-sibling theme propagation via localStorage", "nodes": ["readme_decision_theme_key", "apphtml_theme_bootstrap", "readme_buildfor_life_budget", "readme_buildfor_life_repair"], "relation": "form", "confidence": "INFERRED", "confidence_score": 0.8, "source_file": "README.md"} + ], + "input_tokens": 0, + "output_tokens": 0 +} diff --git a/graphify-out/GRAPH_REPORT.md b/graphify-out/GRAPH_REPORT.md new file mode 100644 index 0000000..c594bfa --- /dev/null +++ b/graphify-out/GRAPH_REPORT.md @@ -0,0 +1,936 @@ +# Graph Report - C:/dev/build_for_life_project (2026-04-23) + +## Corpus Check +- 189 files · ~54,875 words +- Verdict: corpus is large enough that graph structure adds value. + +## Summary +- 453 nodes · 486 edges · 131 communities detected +- Extraction: 80% EXTRACTED · 20% INFERRED · 0% AMBIGUOUS · INFERRED: 97 edges (avg confidence: 0.8) +- Token cost: 0 input · 0 output + +## Community Hubs (Navigation) +- [[_COMMUNITY_Auth & Load Helpers|Auth & Load Helpers]] +- [[_COMMUNITY_Documents Service|Documents Service]] +- [[_COMMUNITY_Assets Service & CSV|Assets Service & CSV]] +- [[_COMMUNITY_Email & Markdown|Email & Markdown]] +- [[_COMMUNITY_Property Accounts|Property Accounts]] +- [[_COMMUNITY_Projects Service|Projects Service]] +- [[_COMMUNITY_App Shell & Theme|App Shell & Theme]] +- [[_COMMUNITY_Asset Core|Asset Core]] +- [[_COMMUNITY_Maintenance Core|Maintenance Core]] +- [[_COMMUNITY_Checklists|Checklists]] +- [[_COMMUNITY_Admin Scripts|Admin Scripts]] +- [[_COMMUNITY_Asset Types Editor|Asset Types Editor]] +- [[_COMMUNITY_Rooms & Floors|Rooms & Floors]] +- [[_COMMUNITY_Tasks|Tasks]] +- [[_COMMUNITY_User Management|User Management]] +- [[_COMMUNITY_DB Schema Helpers|DB Schema Helpers]] +- [[_COMMUNITY_Work Packages|Work Packages]] +- [[_COMMUNITY_Storage Layer|Storage Layer]] +- [[_COMMUNITY_Migration Workflow|Migration Workflow]] +- [[_COMMUNITY_Session Auth|Session Auth]] +- [[_COMMUNITY_Companies Service|Companies Service]] +- [[_COMMUNITY_Form Utilities|Form Utilities]] +- [[_COMMUNITY_Custom Fields Design|Custom Fields Design]] +- [[_COMMUNITY_Field Types|Field Types]] +- [[_COMMUNITY_Form Helper|Form Helper]] +- [[_COMMUNITY_Env Config|Env Config]] +- [[_COMMUNITY_Seed Script|Seed Script]] +- [[_COMMUNITY_Asset Location Design|Asset Location Design]] +- [[_COMMUNITY_Decision Design|Decision Design]] +- [[_COMMUNITY_Drizzle Config|Drizzle Config]] +- [[_COMMUNITY_Cluster 30|Cluster 30]] +- [[_COMMUNITY_Cluster 31|Cluster 31]] +- [[_COMMUNITY_Cluster 32|Cluster 32]] +- [[_COMMUNITY_Cluster 33|Cluster 33]] +- [[_COMMUNITY_Cluster 34|Cluster 34]] +- [[_COMMUNITY_Cluster 35|Cluster 35]] +- [[_COMMUNITY_Cluster 36|Cluster 36]] +- [[_COMMUNITY_Cluster 37|Cluster 37]] +- [[_COMMUNITY_Cluster 38|Cluster 38]] +- [[_COMMUNITY_Cluster 39|Cluster 39]] +- [[_COMMUNITY_Cluster 40|Cluster 40]] +- [[_COMMUNITY_Cluster 41|Cluster 41]] +- [[_COMMUNITY_Cluster 42|Cluster 42]] +- [[_COMMUNITY_Cluster 43|Cluster 43]] +- [[_COMMUNITY_Cluster 44|Cluster 44]] +- [[_COMMUNITY_Cluster 45|Cluster 45]] +- [[_COMMUNITY_Cluster 46|Cluster 46]] +- [[_COMMUNITY_Cluster 47|Cluster 47]] +- [[_COMMUNITY_Cluster 48|Cluster 48]] +- [[_COMMUNITY_Cluster 49|Cluster 49]] +- [[_COMMUNITY_Cluster 50|Cluster 50]] +- [[_COMMUNITY_Cluster 51|Cluster 51]] +- [[_COMMUNITY_Cluster 52|Cluster 52]] +- [[_COMMUNITY_Cluster 53|Cluster 53]] +- [[_COMMUNITY_Cluster 54|Cluster 54]] +- [[_COMMUNITY_Cluster 55|Cluster 55]] +- [[_COMMUNITY_Cluster 56|Cluster 56]] +- [[_COMMUNITY_Cluster 57|Cluster 57]] +- [[_COMMUNITY_Cluster 58|Cluster 58]] +- [[_COMMUNITY_Cluster 59|Cluster 59]] +- [[_COMMUNITY_Cluster 60|Cluster 60]] +- [[_COMMUNITY_Cluster 61|Cluster 61]] +- [[_COMMUNITY_Cluster 62|Cluster 62]] +- [[_COMMUNITY_Cluster 63|Cluster 63]] +- [[_COMMUNITY_Cluster 64|Cluster 64]] +- [[_COMMUNITY_Cluster 65|Cluster 65]] +- [[_COMMUNITY_Cluster 66|Cluster 66]] +- [[_COMMUNITY_Cluster 67|Cluster 67]] +- [[_COMMUNITY_Cluster 68|Cluster 68]] +- [[_COMMUNITY_Cluster 69|Cluster 69]] +- [[_COMMUNITY_Cluster 70|Cluster 70]] +- [[_COMMUNITY_Cluster 71|Cluster 71]] +- [[_COMMUNITY_Cluster 72|Cluster 72]] +- [[_COMMUNITY_Cluster 73|Cluster 73]] +- [[_COMMUNITY_Cluster 74|Cluster 74]] +- [[_COMMUNITY_Cluster 75|Cluster 75]] +- [[_COMMUNITY_Cluster 76|Cluster 76]] +- [[_COMMUNITY_Cluster 77|Cluster 77]] +- [[_COMMUNITY_Cluster 78|Cluster 78]] +- [[_COMMUNITY_Cluster 79|Cluster 79]] +- [[_COMMUNITY_Cluster 80|Cluster 80]] +- [[_COMMUNITY_Cluster 81|Cluster 81]] +- [[_COMMUNITY_Cluster 82|Cluster 82]] +- [[_COMMUNITY_Cluster 83|Cluster 83]] +- [[_COMMUNITY_Cluster 84|Cluster 84]] +- [[_COMMUNITY_Cluster 85|Cluster 85]] +- [[_COMMUNITY_Cluster 86|Cluster 86]] +- [[_COMMUNITY_Cluster 87|Cluster 87]] +- [[_COMMUNITY_Cluster 88|Cluster 88]] +- [[_COMMUNITY_Cluster 89|Cluster 89]] +- [[_COMMUNITY_Cluster 90|Cluster 90]] +- [[_COMMUNITY_Cluster 91|Cluster 91]] +- [[_COMMUNITY_Cluster 92|Cluster 92]] +- [[_COMMUNITY_Cluster 93|Cluster 93]] +- [[_COMMUNITY_Cluster 94|Cluster 94]] +- [[_COMMUNITY_Cluster 95|Cluster 95]] +- [[_COMMUNITY_Cluster 96|Cluster 96]] +- [[_COMMUNITY_Cluster 97|Cluster 97]] +- [[_COMMUNITY_Cluster 98|Cluster 98]] +- [[_COMMUNITY_Cluster 99|Cluster 99]] +- [[_COMMUNITY_Cluster 100|Cluster 100]] +- [[_COMMUNITY_Cluster 101|Cluster 101]] +- [[_COMMUNITY_Cluster 102|Cluster 102]] +- [[_COMMUNITY_Cluster 103|Cluster 103]] +- [[_COMMUNITY_Cluster 104|Cluster 104]] +- [[_COMMUNITY_Cluster 105|Cluster 105]] +- [[_COMMUNITY_Cluster 106|Cluster 106]] +- [[_COMMUNITY_Cluster 107|Cluster 107]] +- [[_COMMUNITY_Cluster 108|Cluster 108]] +- [[_COMMUNITY_Cluster 109|Cluster 109]] +- [[_COMMUNITY_Cluster 110|Cluster 110]] +- [[_COMMUNITY_Cluster 111|Cluster 111]] +- [[_COMMUNITY_Cluster 112|Cluster 112]] +- [[_COMMUNITY_Cluster 113|Cluster 113]] +- [[_COMMUNITY_Cluster 114|Cluster 114]] +- [[_COMMUNITY_Cluster 115|Cluster 115]] +- [[_COMMUNITY_Cluster 116|Cluster 116]] +- [[_COMMUNITY_Cluster 117|Cluster 117]] +- [[_COMMUNITY_Cluster 118|Cluster 118]] +- [[_COMMUNITY_Cluster 119|Cluster 119]] +- [[_COMMUNITY_Cluster 120|Cluster 120]] +- [[_COMMUNITY_Cluster 121|Cluster 121]] +- [[_COMMUNITY_Cluster 122|Cluster 122]] +- [[_COMMUNITY_Cluster 123|Cluster 123]] +- [[_COMMUNITY_Cluster 124|Cluster 124]] +- [[_COMMUNITY_Cluster 125|Cluster 125]] +- [[_COMMUNITY_Cluster 126|Cluster 126]] +- [[_COMMUNITY_Cluster 127|Cluster 127]] +- [[_COMMUNITY_Cluster 128|Cluster 128]] +- [[_COMMUNITY_Cluster 129|Cluster 129]] +- [[_COMMUNITY_Cluster 130|Cluster 130]] + +## God Nodes (most connected - your core abstractions) +1. `load()` - 79 edges +2. `GET()` - 20 edges +3. `LocalDiskStorage` - 10 edges +4. `load()` - 9 edges +5. `S3Storage` - 8 edges +6. `buildfor_life_ops` - 8 edges +7. `fanOutExternal()` - 7 edges +8. `getTaskWithSubtasks()` - 7 edges +9. `handle()` - 6 edges +10. `uploadDocument()` - 6 edges + +## Surprising Connections (you probably didn't know these) +- `load()` --calls--> `renderMarkdown()` [INFERRED] + src\routes\(auth)\login\+page.server.ts → src\lib\server\markdown.ts +- `load()` --calls--> `listTemplates()` [INFERRED] + src\routes\(auth)\login\+page.server.ts → src\lib\server\services\checklists.ts +- `load()` --calls--> `getCompany()` [INFERRED] + src\routes\(auth)\login\+page.server.ts → src\lib\server\services\companies.ts +- `load()` --calls--> `listDocumentsForScope()` [INFERRED] + src\routes\(auth)\login\+page.server.ts → src\lib\server\services\documents.ts +- `load()` --calls--> `countOverdueForCompany()` [INFERRED] + src\routes\(auth)\login\+page.server.ts → src\lib\server\services\maintenance.ts + +## Hyperedges (group relationships) +- **Session auth flow (cookie, hash, hook, gate)** — readme_auth_model, readme_sha256_cookie_hash, readme_sliding_renewal, readme_hooks_server, readme_layout_app_group [EXTRACTED 0.95] +- **Storage abstraction (adapter, local impl, signed URLs, file route)** — readme_storage_adapter, readme_local_disk_storage, readme_hmac_signed_urls, readme_api_files_route, readme_storage_model [EXTRACTED 0.95] +- **Cross-sibling theme propagation via localStorage** — readme_decision_theme_key, apphtml_theme_bootstrap, readme_buildfor_life_budget, readme_buildfor_life_repair [INFERRED 0.80] + +## Communities + +### Community 0 - "Auth & Load Helpers" +Cohesion: 0.04 +Nodes (12): requireAdmin(), requireCompany(), load(), parseSettings(), getPageWithCurrentRevision(), getRevision(), listPagesForScope(), listRevisions() (+4 more) + +### Community 1 - "Documents Service" +Cohesion: 0.07 +Nodes (13): assertScope(), deleteDocument(), getDocument(), listDocumentsForScope(), signedUrlForDocument(), uploadDocument(), getStorage(), LocalDiskStorage (+5 more) + +### Community 2 - "Assets Service & CSV" +Cohesion: 0.11 +Nodes (13): listAssets(), csvResponse(), toCsv(), gatherCustomFieldsFromForm(), createDecision(), decisionScopeLink(), listDecisionsForScope(), clamp() (+5 more) + +### Community 3 - "Email & Markdown" +Cohesion: 0.13 +Nodes (15): getTransport(), isEmailConfigured(), sendEmail(), escapeHtml(), html(), renderMarkdown(), buildBodies(), isMatrixConfigured() (+7 more) + +### Community 4 - "Property Accounts" +Cohesion: 0.15 +Nodes (12): assertProperty(), createAccount(), deleteAccount(), listAccounts(), handle(), deleteFloor(), handleLogout(), createSession() (+4 more) + +### Community 5 - "Projects Service" +Cohesion: 0.11 +Nodes (6): load(), unreadCountForUser(), getProject(), listProjects(), getProperty(), listProperties() + +### Community 6 - "App Shell & Theme" +Cohesion: 0.13 +Nodes (16): data-sveltekit-preload-data=hover, app.html root document, %sveltekit.head% / %sveltekit.body% placeholders, Tailwind body classes with dark: variants, Dark-mode bootstrap inline script (localStorage['theme']), Argon2id sessions (@node-rs/argon2 + @oslojs/crypto), buildfor_life_budget (sibling), buildfor_life_ops (+8 more) + +### Community 7 - "Asset Core" +Cohesion: 0.22 +Nodes (10): assertContainer(), createAsset(), loadTypeWithFields(), moveAsset(), updateAsset(), validateCustomFields(), buildCustomFieldsSchema(), getCachedCustomFieldsSchema() (+2 more) + +### Community 8 - "Maintenance Core" +Cohesion: 0.22 +Nodes (13): addInterval(), assertAsset(), countOverdueForCompany(), createSchedule(), deleteSchedule(), getSchedule(), listDueAndOverdue(), listEventsForAsset() (+5 more) + +### Community 9 - "Checklists" +Cohesion: 0.19 +Nodes (7): addTemplateItem(), deleteTemplate(), getInstance(), getTemplate(), listTemplates(), removeTemplateItem(), setItemDone() + +### Community 10 - "Admin Scripts" +Cohesion: 0.24 +Nodes (9): main(), readArg(), slugify(), stripSurroundingQuotes(), main(), readArg(), stripSurroundingQuotes(), normalizeEmail() (+1 more) + +### Community 11 - "Asset Types Editor" +Cohesion: 0.31 +Nodes (8): addFieldDef(), createCompanyAssetType(), deleteCompanyAssetType(), loadEditableType(), normalizeFieldKey(), removeFieldDef(), slugifyTypeSlug(), updateCompanyAssetType() + +### Community 12 - "Rooms & Floors" +Cohesion: 0.33 +Nodes (8): assertProperty(), createFloor(), createRoom(), getRoom(), listFloors(), listRoomsWithCounts(), softDeleteRoom(), updateRoom() + +### Community 13 - "Tasks" +Cohesion: 0.36 +Nodes (9): addSubtask(), assertWorkPackage(), createTask(), getTaskWithSubtasks(), listTasksForWorkPackage(), removeSubtask(), softDeleteTask(), toggleSubtask() (+1 more) + +### Community 14 - "User Management" +Cohesion: 0.38 +Nodes (8): assertMembership(), countAdmins(), listCompanyUsers(), removeUserFromCompany(), resetUserPassword(), setUserActive(), setUserRoleInCompany(), updateDisplayName() + +### Community 15 - "DB Schema Helpers" +Cohesion: 0.29 +Nodes (0): + +### Community 16 - "Work Packages" +Cohesion: 0.48 +Nodes (6): assertProject(), createWorkPackage(), getWorkPackage(), listWorkPackagesForProject(), softDeleteWorkPackage(), updateWorkPackage() + +### Community 17 - "Storage Layer" +Cohesion: 0.38 +Nodes (7): /api/files route (signature verification + streaming), HMAC-signed short-lived file URLs, LocalDiskStorage, Phase 5: QR, notifications, S3, S3Storage (future), StorageAdapter interface, Storage model (opaque storage_key) + +### Community 18 - "Migration Workflow" +Cohesion: 0.29 +Nodes (7): Use CONCURRENTLY on large-table index changes, Drizzle migrations directory, Review SQL after generate: enum/index/custom_fields, npm run db:generate, npm run db:migrate, npm run db:push (dev only), npm run db:studio (Drizzle Studio) + +### Community 19 - "Session Auth" +Cohesion: 0.33 +Nodes (6): Auth model (sessions + hashed cookies), company_users role mapping, hooks.server.ts (session validation), (app) route group (authed shell), SHA-256 cookie hashing before DB lookup, Sliding session renewal (30d/15d) + +### Community 20 - "Companies Service" +Cohesion: 0.6 +Nodes (4): createCompanyWithAdmin(), getCompany(), slugify(), updateCompany() + +### Community 21 - "Form Utilities" +Cohesion: 0.4 +Nodes (1): e2n() + +### Community 22 - "Custom Fields Design" +Cohesion: 0.5 +Nodes (4): Immutable-key policy reference, Decision: immutable custom-field keys, Decision: JSONB custom fields + asset_field_defs, Phase 1: Properties + Assets + +### Community 23 - "Field Types" +Cohesion: 1.0 +Nodes (0): + +### Community 24 - "Form Helper" +Cohesion: 1.0 +Nodes (0): + +### Community 25 - "Env Config" +Cohesion: 1.0 +Nodes (2): .env configuration, env.ts (Zod-validated process.env) + +### Community 26 - "Seed Script" +Cohesion: 1.0 +Nodes (2): npm run create-user script, src/lib/server/db/schema/ + +### Community 27 - "Asset Location Design" +Cohesion: 1.0 +Nodes (2): Decision: asset_location_history (movable assets), Decision: XOR asset location (project XOR property) + +### Community 28 - "Decision Design" +Cohesion: 1.0 +Nodes (2): Decision: decisions scoped to project/property/asset/work_package, Phase 3: Projects + structured decisions + +### Community 29 - "Drizzle Config" +Cohesion: 1.0 +Nodes (0): + +### Community 30 - "Cluster 30" +Cohesion: 1.0 +Nodes (0): + +### Community 31 - "Cluster 31" +Cohesion: 1.0 +Nodes (0): + +### Community 32 - "Cluster 32" +Cohesion: 1.0 +Nodes (0): + +### Community 33 - "Cluster 33" +Cohesion: 1.0 +Nodes (0): + +### Community 34 - "Cluster 34" +Cohesion: 1.0 +Nodes (0): + +### Community 35 - "Cluster 35" +Cohesion: 1.0 +Nodes (0): + +### Community 36 - "Cluster 36" +Cohesion: 1.0 +Nodes (0): + +### Community 37 - "Cluster 37" +Cohesion: 1.0 +Nodes (0): + +### Community 38 - "Cluster 38" +Cohesion: 1.0 +Nodes (0): + +### Community 39 - "Cluster 39" +Cohesion: 1.0 +Nodes (0): + +### Community 40 - "Cluster 40" +Cohesion: 1.0 +Nodes (0): + +### Community 41 - "Cluster 41" +Cohesion: 1.0 +Nodes (0): + +### Community 42 - "Cluster 42" +Cohesion: 1.0 +Nodes (0): + +### Community 43 - "Cluster 43" +Cohesion: 1.0 +Nodes (0): + +### Community 44 - "Cluster 44" +Cohesion: 1.0 +Nodes (0): + +### Community 45 - "Cluster 45" +Cohesion: 1.0 +Nodes (0): + +### Community 46 - "Cluster 46" +Cohesion: 1.0 +Nodes (0): + +### Community 47 - "Cluster 47" +Cohesion: 1.0 +Nodes (0): + +### Community 48 - "Cluster 48" +Cohesion: 1.0 +Nodes (0): + +### Community 49 - "Cluster 49" +Cohesion: 1.0 +Nodes (0): + +### Community 50 - "Cluster 50" +Cohesion: 1.0 +Nodes (0): + +### Community 51 - "Cluster 51" +Cohesion: 1.0 +Nodes (0): + +### Community 52 - "Cluster 52" +Cohesion: 1.0 +Nodes (0): + +### Community 53 - "Cluster 53" +Cohesion: 1.0 +Nodes (0): + +### Community 54 - "Cluster 54" +Cohesion: 1.0 +Nodes (0): + +### Community 55 - "Cluster 55" +Cohesion: 1.0 +Nodes (0): + +### Community 56 - "Cluster 56" +Cohesion: 1.0 +Nodes (0): + +### Community 57 - "Cluster 57" +Cohesion: 1.0 +Nodes (0): + +### Community 58 - "Cluster 58" +Cohesion: 1.0 +Nodes (0): + +### Community 59 - "Cluster 59" +Cohesion: 1.0 +Nodes (0): + +### Community 60 - "Cluster 60" +Cohesion: 1.0 +Nodes (0): + +### Community 61 - "Cluster 61" +Cohesion: 1.0 +Nodes (0): + +### Community 62 - "Cluster 62" +Cohesion: 1.0 +Nodes (0): + +### Community 63 - "Cluster 63" +Cohesion: 1.0 +Nodes (0): + +### Community 64 - "Cluster 64" +Cohesion: 1.0 +Nodes (0): + +### Community 65 - "Cluster 65" +Cohesion: 1.0 +Nodes (0): + +### Community 66 - "Cluster 66" +Cohesion: 1.0 +Nodes (0): + +### Community 67 - "Cluster 67" +Cohesion: 1.0 +Nodes (0): + +### Community 68 - "Cluster 68" +Cohesion: 1.0 +Nodes (0): + +### Community 69 - "Cluster 69" +Cohesion: 1.0 +Nodes (0): + +### Community 70 - "Cluster 70" +Cohesion: 1.0 +Nodes (0): + +### Community 71 - "Cluster 71" +Cohesion: 1.0 +Nodes (0): + +### Community 72 - "Cluster 72" +Cohesion: 1.0 +Nodes (0): + +### Community 73 - "Cluster 73" +Cohesion: 1.0 +Nodes (0): + +### Community 74 - "Cluster 74" +Cohesion: 1.0 +Nodes (0): + +### Community 75 - "Cluster 75" +Cohesion: 1.0 +Nodes (0): + +### Community 76 - "Cluster 76" +Cohesion: 1.0 +Nodes (0): + +### Community 77 - "Cluster 77" +Cohesion: 1.0 +Nodes (0): + +### Community 78 - "Cluster 78" +Cohesion: 1.0 +Nodes (0): + +### Community 79 - "Cluster 79" +Cohesion: 1.0 +Nodes (0): + +### Community 80 - "Cluster 80" +Cohesion: 1.0 +Nodes (0): + +### Community 81 - "Cluster 81" +Cohesion: 1.0 +Nodes (0): + +### Community 82 - "Cluster 82" +Cohesion: 1.0 +Nodes (0): + +### Community 83 - "Cluster 83" +Cohesion: 1.0 +Nodes (0): + +### Community 84 - "Cluster 84" +Cohesion: 1.0 +Nodes (0): + +### Community 85 - "Cluster 85" +Cohesion: 1.0 +Nodes (0): + +### Community 86 - "Cluster 86" +Cohesion: 1.0 +Nodes (0): + +### Community 87 - "Cluster 87" +Cohesion: 1.0 +Nodes (0): + +### Community 88 - "Cluster 88" +Cohesion: 1.0 +Nodes (0): + +### Community 89 - "Cluster 89" +Cohesion: 1.0 +Nodes (0): + +### Community 90 - "Cluster 90" +Cohesion: 1.0 +Nodes (0): + +### Community 91 - "Cluster 91" +Cohesion: 1.0 +Nodes (0): + +### Community 92 - "Cluster 92" +Cohesion: 1.0 +Nodes (0): + +### Community 93 - "Cluster 93" +Cohesion: 1.0 +Nodes (0): + +### Community 94 - "Cluster 94" +Cohesion: 1.0 +Nodes (0): + +### Community 95 - "Cluster 95" +Cohesion: 1.0 +Nodes (0): + +### Community 96 - "Cluster 96" +Cohesion: 1.0 +Nodes (0): + +### Community 97 - "Cluster 97" +Cohesion: 1.0 +Nodes (0): + +### Community 98 - "Cluster 98" +Cohesion: 1.0 +Nodes (0): + +### Community 99 - "Cluster 99" +Cohesion: 1.0 +Nodes (0): + +### Community 100 - "Cluster 100" +Cohesion: 1.0 +Nodes (0): + +### Community 101 - "Cluster 101" +Cohesion: 1.0 +Nodes (0): + +### Community 102 - "Cluster 102" +Cohesion: 1.0 +Nodes (0): + +### Community 103 - "Cluster 103" +Cohesion: 1.0 +Nodes (0): + +### Community 104 - "Cluster 104" +Cohesion: 1.0 +Nodes (0): + +### Community 105 - "Cluster 105" +Cohesion: 1.0 +Nodes (0): + +### Community 106 - "Cluster 106" +Cohesion: 1.0 +Nodes (0): + +### Community 107 - "Cluster 107" +Cohesion: 1.0 +Nodes (0): + +### Community 108 - "Cluster 108" +Cohesion: 1.0 +Nodes (0): + +### Community 109 - "Cluster 109" +Cohesion: 1.0 +Nodes (0): + +### Community 110 - "Cluster 110" +Cohesion: 1.0 +Nodes (0): + +### Community 111 - "Cluster 111" +Cohesion: 1.0 +Nodes (0): + +### Community 112 - "Cluster 112" +Cohesion: 1.0 +Nodes (0): + +### Community 113 - "Cluster 113" +Cohesion: 1.0 +Nodes (0): + +### Community 114 - "Cluster 114" +Cohesion: 1.0 +Nodes (0): + +### Community 115 - "Cluster 115" +Cohesion: 1.0 +Nodes (0): + +### Community 116 - "Cluster 116" +Cohesion: 1.0 +Nodes (0): + +### Community 117 - "Cluster 117" +Cohesion: 1.0 +Nodes (0): + +### Community 118 - "Cluster 118" +Cohesion: 1.0 +Nodes (0): + +### Community 119 - "Cluster 119" +Cohesion: 1.0 +Nodes (0): + +### Community 120 - "Cluster 120" +Cohesion: 1.0 +Nodes (1): npm run db:seed + +### Community 121 - "Cluster 121" +Cohesion: 1.0 +Nodes (1): npm run validate (check + build) + +### Community 122 - "Cluster 122" +Cohesion: 1.0 +Nodes (1): (auth) route group (login shell) + +### Community 123 - "Cluster 123" +Cohesion: 1.0 +Nodes (1): Phase 0: scaffold (shipped) + +### Community 124 - "Cluster 124" +Cohesion: 1.0 +Nodes (1): Phase 2: Checklists + maintenance + +### Community 125 - "Cluster 125" +Cohesion: 1.0 +Nodes (1): Decision: UUID v7 primary keys + +### Community 126 - "Cluster 126" +Cohesion: 1.0 +Nodes (1): Decision: timestamptz UTC everywhere + +### Community 127 - "Cluster 127" +Cohesion: 1.0 +Nodes (1): Decision: soft delete (deleted_at) + +### Community 128 - "Cluster 128" +Cohesion: 1.0 +Nodes (1): Decision: numeric(18,4) + char(3) currency + +### Community 129 - "Cluster 129" +Cohesion: 1.0 +Nodes (1): Decision: company default currency in settings_json + +### Community 130 - "Cluster 130" +Cohesion: 1.0 +Nodes (1): Decision: tabs = nested routes (not query-string) + +## Knowledge Gaps +- **42 isolated node(s):** `buildfor_life_budget (sibling)`, `buildfor_life_repair (sibling)`, `PostgreSQL 16+ via Drizzle ORM + Zod`, `Argon2id sessions (@node-rs/argon2 + @oslojs/crypto)`, `Sharp image thumbnails` (+37 more) + These have ≤1 connection - possible missing edges or undocumented components. +- **Thin community `Field Types`** (2 nodes): `needsEnumValues()`, `field-types.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Form Helper`** (2 nodes): `emptyToNull()`, `+page.server.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Env Config`** (2 nodes): `.env configuration`, `env.ts (Zod-validated process.env)` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Seed Script`** (2 nodes): `npm run create-user script`, `src/lib/server/db/schema/` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Asset Location Design`** (2 nodes): `Decision: asset_location_history (movable assets)`, `Decision: XOR asset location (project XOR property)` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Decision Design`** (2 nodes): `Decision: decisions scoped to project/property/asset/work_package`, `Phase 3: Projects + structured decisions` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Drizzle Config`** (1 nodes): `drizzle.config.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 30`** (1 nodes): `svelte.config.js` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 31`** (1 nodes): `vite.config.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 32`** (1 nodes): `app.d.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 33`** (1 nodes): `accounts.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 34`** (1 nodes): `notifications.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 35`** (1 nodes): `roles.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 36`** (1 nodes): `CustomFieldsForm.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 37`** (1 nodes): `Sidebar.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 38`** (1 nodes): `TabNav.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 39`** (1 nodes): `ThemeToggle.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 40`** (1 nodes): `TopBar.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 41`** (1 nodes): `env.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 42`** (1 nodes): `types.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 43`** (1 nodes): `client.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 44`** (1 nodes): `accounts.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 45`** (1 nodes): `assets.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 46`** (1 nodes): `checklists.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 47`** (1 nodes): `decisions.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 48`** (1 nodes): `documents.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 49`** (1 nodes): `index.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 50`** (1 nodes): `maintenance.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 51`** (1 nodes): `notifications.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 52`** (1 nodes): `projects.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 53`** (1 nodes): `properties.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 54`** (1 nodes): `rooms.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 55`** (1 nodes): `tenancy.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 56`** (1 nodes): `wiki.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 57`** (1 nodes): `+error.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 58`** (1 nodes): `+layout.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 59`** (1 nodes): `+layout.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 60`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 61`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 62`** (1 nodes): `+page.server.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 63`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 64`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 65`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 66`** (1 nodes): `+page.server.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 67`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 68`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 69`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 70`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 71`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 72`** (1 nodes): `+layout.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 73`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 74`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 75`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 76`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 77`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 78`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 79`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 80`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 81`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 82`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 83`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 84`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 85`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 86`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 87`** (1 nodes): `+layout.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 88`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 89`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 90`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 91`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 92`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 93`** (1 nodes): `+page.server.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 94`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 95`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 96`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 97`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 98`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 99`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 100`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 101`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 102`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 103`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 104`** (1 nodes): `+layout.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 105`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 106`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 107`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 108`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 109`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 110`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 111`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 112`** (1 nodes): `+page.server.ts` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 113`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 114`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 115`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 116`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 117`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 118`** (1 nodes): `+layout.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 119`** (1 nodes): `+page.svelte` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 120`** (1 nodes): `npm run db:seed` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 121`** (1 nodes): `npm run validate (check + build)` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 122`** (1 nodes): `(auth) route group (login shell)` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 123`** (1 nodes): `Phase 0: scaffold (shipped)` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 124`** (1 nodes): `Phase 2: Checklists + maintenance` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 125`** (1 nodes): `Decision: UUID v7 primary keys` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 126`** (1 nodes): `Decision: timestamptz UTC everywhere` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 127`** (1 nodes): `Decision: soft delete (deleted_at)` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 128`** (1 nodes): `Decision: numeric(18,4) + char(3) currency` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 129`** (1 nodes): `Decision: company default currency in settings_json` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. +- **Thin community `Cluster 130`** (1 nodes): `Decision: tabs = nested routes (not query-string)` + Too small to be a meaningful cluster - may be noise or needs more connections extracted. + +## Suggested Questions +_Questions this graph is uniquely positioned to answer:_ + +- **Why does `load()` connect `Auth & Load Helpers` to `Documents Service`, `Assets Service & CSV`, `Email & Markdown`, `Property Accounts`, `Projects Service`, `Asset Core`, `Maintenance Core`, `Checklists`, `Rooms & Floors`, `Tasks`, `User Management`, `Work Packages`, `Companies Service`, `Form Utilities`?** + _High betweenness centrality (0.298) - this node is a cross-community bridge._ +- **Why does `GET()` connect `Assets Service & CSV` to `Auth & Load Helpers`, `Documents Service`, `Property Accounts`, `Asset Core`, `Maintenance Core`?** + _High betweenness centrality (0.120) - this node is a cross-community bridge._ +- **Why does `listCompanyUsers()` connect `User Management` to `Auth & Load Helpers`?** + _High betweenness centrality (0.040) - this node is a cross-community bridge._ +- **Are the 34 inferred relationships involving `load()` (e.g. with `countOverdueForCompany()` and `listDueAndOverdue()`) actually correct?** + _`load()` has 34 INFERRED edges - model-reasoned connections that need verification._ +- **Are the 13 inferred relationships involving `GET()` (e.g. with `syncFieldDefs()` and `handle()`) actually correct?** + _`GET()` has 13 INFERRED edges - model-reasoned connections that need verification._ +- **Are the 5 inferred relationships involving `load()` (e.g. with `setActiveCompany()` and `unreadCountForUser()`) actually correct?** + _`load()` has 5 INFERRED edges - model-reasoned connections that need verification._ +- **What connects `buildfor_life_budget (sibling)`, `buildfor_life_repair (sibling)`, `PostgreSQL 16+ via Drizzle ORM + Zod` to the rest of the system?** + _42 weakly-connected nodes found - possible documentation gaps or missing edges._ \ No newline at end of file diff --git a/graphify-out/cache/0195129504dd0959b76dcd433262c01cd619860207e79729af7e5cdd81152d08.json b/graphify-out/cache/0195129504dd0959b76dcd433262c01cd619860207e79729af7e5cdd81152d08.json new file mode 100644 index 0000000..de42320 --- /dev/null +++ b/graphify-out/cache/0195129504dd0959b76dcd433262c01cd619860207e79729af7e5cdd81152d08.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_accounts_ts", "label": "accounts.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L1"}, {"id": "accounts_assertproperty", "label": "assertProperty()", "file_type": "code", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L13"}, {"id": "accounts_listaccounts", "label": "listAccounts()", "file_type": "code", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L28"}, {"id": "accounts_createaccount", "label": "createAccount()", "file_type": "code", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L40"}, {"id": "accounts_updateaccount", "label": "updateAccount()", "file_type": "code", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L82"}, {"id": "accounts_deleteaccount", "label": "deleteAccount()", "file_type": "code", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L117"}], "edges": [{"source": "src_lib_server_services_accounts_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "accounts", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "accounts", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L9", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "accounts_assertproperty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L13", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "accounts_listaccounts", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L28", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "accounts_createaccount", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L40", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "accounts_updateaccount", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L82", "weight": 1.0}, {"source": "src_lib_server_services_accounts_ts", "target": "accounts_deleteaccount", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L117", "weight": 1.0}, {"source": "accounts_listaccounts", "target": "accounts_assertproperty", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L32", "weight": 1.0}, {"source": "accounts_createaccount", "target": "accounts_assertproperty", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L50", "weight": 1.0}], "raw_calls": [{"caller_nid": "accounts_assertproperty", "callee": "limit", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L14"}, {"caller_nid": "accounts_assertproperty", "callee": "where", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L14"}, {"caller_nid": "accounts_assertproperty", "callee": "from", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L14"}, {"caller_nid": "accounts_assertproperty", "callee": "select", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L14"}, {"caller_nid": "accounts_assertproperty", "callee": "and", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L18"}, {"caller_nid": "accounts_assertproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L19"}, {"caller_nid": "accounts_assertproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L20"}, {"caller_nid": "accounts_assertproperty", "callee": "isNull", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L21"}, {"caller_nid": "accounts_listaccounts", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L33"}, {"caller_nid": "accounts_listaccounts", "callee": "where", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L33"}, {"caller_nid": "accounts_listaccounts", "callee": "from", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L33"}, {"caller_nid": "accounts_listaccounts", "callee": "select", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L33"}, {"caller_nid": "accounts_listaccounts", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L36"}, {"caller_nid": "accounts_listaccounts", "callee": "asc", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L37"}, {"caller_nid": "accounts_listaccounts", "callee": "asc", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L37"}, {"caller_nid": "accounts_listaccounts", "callee": "asc", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L37"}, {"caller_nid": "accounts_createaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L52"}, {"caller_nid": "accounts_createaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L52"}, {"caller_nid": "accounts_createaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L52"}, {"caller_nid": "accounts_createaccount", "callee": "where", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L56"}, {"caller_nid": "accounts_createaccount", "callee": "from", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L56"}, {"caller_nid": "accounts_createaccount", "callee": "select", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L56"}, {"caller_nid": "accounts_createaccount", "callee": "and", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L60"}, {"caller_nid": "accounts_createaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L61"}, {"caller_nid": "accounts_createaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L62"}, {"caller_nid": "accounts_createaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L68"}, {"caller_nid": "accounts_createaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L69"}, {"caller_nid": "accounts_createaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L70"}, {"caller_nid": "accounts_createaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L71"}, {"caller_nid": "accounts_createaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L72"}, {"caller_nid": "accounts_createaccount", "callee": "returning", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L75"}, {"caller_nid": "accounts_createaccount", "callee": "values", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L75"}, {"caller_nid": "accounts_createaccount", "callee": "insert", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L75"}, {"caller_nid": "accounts_updateaccount", "callee": "limit", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L95"}, {"caller_nid": "accounts_updateaccount", "callee": "where", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L95"}, {"caller_nid": "accounts_updateaccount", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L95"}, {"caller_nid": "accounts_updateaccount", "callee": "from", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L95"}, {"caller_nid": "accounts_updateaccount", "callee": "select", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L95"}, {"caller_nid": "accounts_updateaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L98"}, {"caller_nid": "accounts_updateaccount", "callee": "and", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L99"}, {"caller_nid": "accounts_updateaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L99"}, {"caller_nid": "accounts_updateaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L99"}, {"caller_nid": "accounts_updateaccount", "callee": "where", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L102"}, {"caller_nid": "accounts_updateaccount", "callee": "set", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L102"}, {"caller_nid": "accounts_updateaccount", "callee": "update", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L102"}, {"caller_nid": "accounts_updateaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L106"}, {"caller_nid": "accounts_updateaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L107"}, {"caller_nid": "accounts_updateaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L109"}, {"caller_nid": "accounts_updateaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L111"}, {"caller_nid": "accounts_updateaccount", "callee": "trim", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L112"}, {"caller_nid": "accounts_updateaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L114"}, {"caller_nid": "accounts_deleteaccount", "callee": "limit", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L118"}, {"caller_nid": "accounts_deleteaccount", "callee": "where", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L118"}, {"caller_nid": "accounts_deleteaccount", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L118"}, {"caller_nid": "accounts_deleteaccount", "callee": "from", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L118"}, {"caller_nid": "accounts_deleteaccount", "callee": "select", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L118"}, {"caller_nid": "accounts_deleteaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L121"}, {"caller_nid": "accounts_deleteaccount", "callee": "and", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L122"}, {"caller_nid": "accounts_deleteaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L122"}, {"caller_nid": "accounts_deleteaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L122"}, {"caller_nid": "accounts_deleteaccount", "callee": "where", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L125"}, {"caller_nid": "accounts_deleteaccount", "callee": "delete", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L125"}, {"caller_nid": "accounts_deleteaccount", "callee": "eq", "source_file": "src\\lib\\server\\services\\accounts.ts", "source_location": "L125"}]} \ No newline at end of file diff --git a/graphify-out/cache/04cacf6bfd6fa0c374e806a5dfa4d8ee8478fe2a29a052350b05cc8360f72bca.json b/graphify-out/cache/04cacf6bfd6fa0c374e806a5dfa4d8ee8478fe2a29a052350b05cc8360f72bca.json new file mode 100644 index 0000000..92e308c --- /dev/null +++ b/graphify-out/cache/04cacf6bfd6fa0c374e806a5dfa4d8ee8478fe2a29a052350b05cc8360f72bca.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_new_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L11"}], "edges": [{"source": "src_routes_app_assets_new_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "custom_fields_form", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "src_routes_app_assets_new_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L9", "weight": 1.0}, {"source": "src_routes_app_assets_new_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L11", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "get", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L14"}, {"caller_nid": "page_server_load", "callee": "get", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "or", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L26"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L26"}, {"caller_nid": "page_server_load", "callee": "sql", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L26"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L27"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L29"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L29"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L29"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L29"}, {"caller_nid": "page_server_load", "callee": "and", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L32"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L32"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L32"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L33"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L37"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L37"}, {"caller_nid": "page_server_load", "callee": "innerJoin", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L37"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L37"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L37"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L37"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L45"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L46"}, {"caller_nid": "page_server_load", "callee": "and", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L48"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L49"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L50"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L51"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L54"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L54"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L54"}, {"caller_nid": "page_server_load", "callee": "loadTypeWithFields", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L58"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", "source_location": "L59"}]} \ No newline at end of file diff --git a/graphify-out/cache/0632188bd862d787d97ff389d107d9bce53592ec2aa79c1a0240a28645fb8f33.json b/graphify-out/cache/0632188bd862d787d97ff389d107d9bce53592ec2aa79c1a0240a28645fb8f33.json new file mode 100644 index 0000000..06a67e7 --- /dev/null +++ b/graphify-out/cache/0632188bd862d787d97ff389d107d9bce53592ec2aa79c1a0240a28645fb8f33.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_auth_session_ts", "label": "session.ts", "file_type": "code", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L1"}, {"id": "session_generatesessiontoken", "label": "generateSessionToken()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L12"}, {"id": "session_hashtoken", "label": "hashToken()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L18"}, {"id": "session_createsession", "label": "createSession()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L22"}, {"id": "session_validatesession", "label": "validateSession()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L45"}, {"id": "session_refreshsession", "label": "refreshSession()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L98"}, {"id": "session_invalidatesession", "label": "invalidateSession()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L106"}, {"id": "session_setactivecompany", "label": "setActiveCompany()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L110"}], "edges": [{"source": "src_lib_server_auth_session_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "sha2", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "encoding", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "src_lib_server_db_client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "src_lib_server_auth_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "session_generatesessiontoken", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L12", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "session_hashtoken", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L18", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "session_createsession", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L22", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "session_validatesession", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L45", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "session_refreshsession", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L98", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "session_invalidatesession", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L106", "weight": 1.0}, {"source": "src_lib_server_auth_session_ts", "target": "session_setactivecompany", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L110", "weight": 1.0}, {"source": "session_createsession", "target": "session_hashtoken", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L27", "weight": 1.0}, {"source": "session_validatesession", "target": "session_hashtoken", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L46", "weight": 1.0}], "raw_calls": [{"caller_nid": "session_generatesessiontoken", "callee": "getRandomValues", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L14"}, {"caller_nid": "session_generatesessiontoken", "callee": "encodeHexLowerCase", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L15"}, {"caller_nid": "session_hashtoken", "callee": "encodeHexLowerCase", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L19"}, {"caller_nid": "session_hashtoken", "callee": "sha256", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L19"}, {"caller_nid": "session_hashtoken", "callee": "encode", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L19"}, {"caller_nid": "session_createsession", "callee": "now", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L28"}, {"caller_nid": "session_createsession", "callee": "values", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L29"}, {"caller_nid": "session_createsession", "callee": "insert", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L29"}, {"caller_nid": "session_validatesession", "callee": "limit", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L47"}, {"caller_nid": "session_validatesession", "callee": "where", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L47"}, {"caller_nid": "session_validatesession", "callee": "innerJoin", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L47"}, {"caller_nid": "session_validatesession", "callee": "from", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L47"}, {"caller_nid": "session_validatesession", "callee": "select", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L47"}, {"caller_nid": "session_validatesession", "callee": "eq", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L58"}, {"caller_nid": "session_validatesession", "callee": "and", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L59"}, {"caller_nid": "session_validatesession", "callee": "eq", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L59"}, {"caller_nid": "session_validatesession", "callee": "gt", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L59"}, {"caller_nid": "session_validatesession", "callee": "limit", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L68"}, {"caller_nid": "session_validatesession", "callee": "where", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L68"}, {"caller_nid": "session_validatesession", "callee": "innerJoin", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L68"}, {"caller_nid": "session_validatesession", "callee": "from", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L68"}, {"caller_nid": "session_validatesession", "callee": "select", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L68"}, {"caller_nid": "session_validatesession", "callee": "eq", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L76"}, {"caller_nid": "session_validatesession", "callee": "and", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L77"}, {"caller_nid": "session_validatesession", "callee": "eq", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L77"}, {"caller_nid": "session_validatesession", "callee": "eq", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L77"}, {"caller_nid": "session_validatesession", "callee": "getTime", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L82"}, {"caller_nid": "session_validatesession", "callee": "now", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L82"}, {"caller_nid": "session_refreshsession", "callee": "now", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L99"}, {"caller_nid": "session_refreshsession", "callee": "where", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L100"}, {"caller_nid": "session_refreshsession", "callee": "set", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L100"}, {"caller_nid": "session_refreshsession", "callee": "update", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L100"}, {"caller_nid": "session_refreshsession", "callee": "eq", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L103"}, {"caller_nid": "session_invalidatesession", "callee": "where", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L107"}, {"caller_nid": "session_invalidatesession", "callee": "delete", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L107"}, {"caller_nid": "session_invalidatesession", "callee": "eq", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L107"}, {"caller_nid": "session_setactivecompany", "callee": "where", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L111"}, {"caller_nid": "session_setactivecompany", "callee": "set", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L111"}, {"caller_nid": "session_setactivecompany", "callee": "update", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L111"}, {"caller_nid": "session_setactivecompany", "callee": "eq", "source_file": "src\\lib\\server\\auth\\session.ts", "source_location": "L111"}]} \ No newline at end of file diff --git a/graphify-out/cache/06c355455e3b489dbfa994b3c1905f0bd86046e71a90789b3a098509d577ea4e.json b/graphify-out/cache/06c355455e3b489dbfa994b3c1905f0bd86046e71a90789b3a098509d577ea4e.json new file mode 100644 index 0000000..ca0e8d2 --- /dev/null +++ b/graphify-out/cache/06c355455e3b489dbfa994b3c1905f0bd86046e71a90789b3a098509d577ea4e.json @@ -0,0 +1 @@ +{"nodes": [{"id": "vite_config_ts", "label": "vite.config.ts", "file_type": "code", "source_file": "vite.config.ts", "source_location": "L1"}], "edges": [{"source": "vite_config_ts", "target": "vite", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "vite.config.ts", "source_location": "L1", "weight": 1.0}, {"source": "vite_config_ts", "target": "vite", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "vite.config.ts", "source_location": "L2", "weight": 1.0}, {"source": "vite_config_ts", "target": "vite", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "vite.config.ts", "source_location": "L3", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/07864ed62285723c0612526189ff476754163e8947236e8125b233dccf9d059f.json b/graphify-out/cache/07864ed62285723c0612526189ff476754163e8947236e8125b233dccf9d059f.json new file mode 100644 index 0000000..73c4f4f --- /dev/null +++ b/graphify-out/cache/07864ed62285723c0612526189ff476754163e8947236e8125b233dccf9d059f.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_client_ts", "label": "client.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\client.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_client_ts", "target": "node_postgres", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\client.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_client_ts", "target": "pg", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\client.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_client_ts", "target": "src_lib_server_env", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\client.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_db_client_ts", "target": "src_lib_server_db_schema", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\client.ts", "source_location": "L4", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/07efe14c7fa7ca359a2365a1ea5bf5c3fdd621903f12b09e06e962ea17fd0689.json b/graphify-out/cache/07efe14c7fa7ca359a2365a1ea5bf5c3fdd621903f12b09e06e962ea17fd0689.json new file mode 100644 index 0000000..a15559d --- /dev/null +++ b/graphify-out/cache/07efe14c7fa7ca359a2365a1ea5bf5c3fdd621903f12b09e06e962ea17fd0689.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_documents_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L12"}], "edges": [{"source": "src_routes_app_properties_id_documents_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_properties_id_documents_page_server_ts", "target": "documents", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_properties_id_documents_page_server_ts", "target": "src_routes_app_properties_id_documents_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_properties_id_documents_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L12", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "listDocumentsForScope", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L14"}, {"caller_nid": "page_server_load", "callee": "all", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "map", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", "source_location": "L16"}]} \ No newline at end of file diff --git a/graphify-out/cache/0894c9567702351ac90e3fd6510866ad75a573565de52155ff57432db5d32f03.json b/graphify-out/cache/0894c9567702351ac90e3fd6510866ad75a573565de52155ff57432db5d32f03.json new file mode 100644 index 0000000..c38fd4d --- /dev/null +++ b/graphify-out/cache/0894c9567702351ac90e3fd6510866ad75a573565de52155ff57432db5d32f03.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_layout_svelte", "label": "+layout.svelte", "file_type": "code", "source_file": "src\\routes\\+layout.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/0954e8addc7c6ba07a5beaaa863ff224b383945b0435ef43a771565a8a3b9ab9.json b/graphify-out/cache/0954e8addc7c6ba07a5beaaa863ff224b383945b0435ef43a771565a8a3b9ab9.json new file mode 100644 index 0000000..9d0f9f4 --- /dev/null +++ b/graphify-out/cache/0954e8addc7c6ba07a5beaaa863ff224b383945b0435ef43a771565a8a3b9ab9.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_e2n", "label": "e2n()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", "source_location": "L15"}], "edges": [{"source": "src_routes_app_projects_id_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_page_server_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_page_server_ts", "target": "src_routes_app_projects_id_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_projects_id_page_server_ts", "target": "page_server_e2n", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", "source_location": "L15", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/0d58689c3c8bc467eca5758573456b8e5dae52f7816bcdf725ec1f4ec561c4a8.json b/graphify-out/cache/0d58689c3c8bc467eca5758573456b8e5dae52f7816bcdf725ec1f4ec561c4a8.json new file mode 100644 index 0000000..fadcf37 --- /dev/null +++ b/graphify-out/cache/0d58689c3c8bc467eca5758573456b8e5dae52f7816bcdf725ec1f4ec561c4a8.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_logs_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/12281f9a29a861da057c763653711f6e44aaabd5b49a25acc853ceb28ec8b27a.json b/graphify-out/cache/12281f9a29a861da057c763653711f6e44aaabd5b49a25acc853ceb28ec8b27a.json new file mode 100644 index 0000000..261a97c --- /dev/null +++ b/graphify-out/cache/12281f9a29a861da057c763653711f6e44aaabd5b49a25acc853ceb28ec8b27a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_slug_history_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/1420cf9ad419d07272bfec26dc81b82dee643eb5ecc2e324959605524119f2c2.json b/graphify-out/cache/1420cf9ad419d07272bfec26dc81b82dee643eb5ecc2e324959605524119f2c2.json new file mode 100644 index 0000000..c63bf74 --- /dev/null +++ b/graphify-out/cache/1420cf9ad419d07272bfec26dc81b82dee643eb5ecc2e324959605524119f2c2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "svelte_config_js", "label": "svelte.config.js", "file_type": "code", "source_file": "svelte.config.js", "source_location": "L1"}], "edges": [{"source": "svelte_config_js", "target": "adapter_node", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "svelte.config.js", "source_location": "L1", "weight": 1.0}, {"source": "svelte_config_js", "target": "vite_plugin_svelte", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "svelte.config.js", "source_location": "L2", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/1578b6ce7e0c88c08d008c1f6be9baed8c83f59b454458944fa690de6f154941.json b/graphify-out/cache/1578b6ce7e0c88c08d008c1f6be9baed8c83f59b454458944fa690de6f154941.json new file mode 100644 index 0000000..a326348 --- /dev/null +++ b/graphify-out/cache/1578b6ce7e0c88c08d008c1f6be9baed8c83f59b454458944fa690de6f154941.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_storage_s3_ts", "label": "s3.ts", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L1"}, {"id": "s3_s3storage", "label": "S3Storage", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L30"}, {"id": "s3_s3storage_constructor", "label": ".constructor()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L34"}, {"id": "s3_s3storage_generatekey", "label": ".generateKey()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L50"}, {"id": "s3_s3storage_put", "label": ".put()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L54"}, {"id": "s3_s3storage_get", "label": ".get()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L77"}, {"id": "s3_s3storage_head", "label": ".head()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L89"}, {"id": "s3_s3storage_delete", "label": ".delete()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L99"}, {"id": "s3_s3storage_getsignedurl", "label": ".getSignedUrl()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L103"}, {"id": "s3_streamtobuffer", "label": "streamToBuffer()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L115"}], "edges": [{"source": "src_lib_server_storage_s3_ts", "target": "client_s3", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_storage_s3_ts", "target": "s3_request_presigner", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L9", "weight": 1.0}, {"source": "src_lib_server_storage_s3_ts", "target": "node_crypto", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L10", "weight": 1.0}, {"source": "src_lib_server_storage_s3_ts", "target": "node_stream", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L11", "weight": 1.0}, {"source": "src_lib_server_storage_s3_ts", "target": "src_lib_server_storage_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L12", "weight": 1.0}, {"source": "src_lib_server_storage_s3_ts", "target": "s3_s3storage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L30", "weight": 1.0}, {"source": "s3_s3storage", "target": "s3_s3storage_constructor", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L34", "weight": 1.0}, {"source": "s3_s3storage", "target": "s3_s3storage_generatekey", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L50", "weight": 1.0}, {"source": "s3_s3storage", "target": "s3_s3storage_put", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L54", "weight": 1.0}, {"source": "s3_s3storage", "target": "s3_s3storage_get", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L77", "weight": 1.0}, {"source": "s3_s3storage", "target": "s3_s3storage_head", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L89", "weight": 1.0}, {"source": "s3_s3storage", "target": "s3_s3storage_delete", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L99", "weight": 1.0}, {"source": "s3_s3storage", "target": "s3_s3storage_getsignedurl", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L103", "weight": 1.0}, {"source": "src_lib_server_storage_s3_ts", "target": "s3_streamtobuffer", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L115", "weight": 1.0}, {"source": "s3_s3storage_put", "target": "s3_streamtobuffer", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L57", "weight": 1.0}], "raw_calls": [{"caller_nid": "s3_s3storage_constructor", "callee": "Boolean", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L38"}, {"caller_nid": "s3_s3storage_generatekey", "callee": "generateStorageKey", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L51"}, {"caller_nid": "s3_s3storage_put", "callee": "isBuffer", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L57"}, {"caller_nid": "s3_s3storage_put", "callee": "digest", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L58"}, {"caller_nid": "s3_s3storage_put", "callee": "update", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L58"}, {"caller_nid": "s3_s3storage_put", "callee": "createHash", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L58"}, {"caller_nid": "s3_s3storage_put", "callee": "send", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L63"}, {"caller_nid": "s3_s3storage_get", "callee": "send", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L78"}, {"caller_nid": "s3_s3storage_head", "callee": "send", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L90"}, {"caller_nid": "s3_s3storage_delete", "callee": "send", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L100"}, {"caller_nid": "s3_s3storage_getsignedurl", "callee": "replace", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L108"}, {"caller_nid": "s3_streamtobuffer", "callee": "push", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L118"}, {"caller_nid": "s3_streamtobuffer", "callee": "isBuffer", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L118"}, {"caller_nid": "s3_streamtobuffer", "callee": "from", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L118"}, {"caller_nid": "s3_streamtobuffer", "callee": "concat", "source_file": "src\\lib\\server\\storage\\s3.ts", "source_location": "L120"}]} \ No newline at end of file diff --git a/graphify-out/cache/16fbf61fdc28a8b2fead5c666c5ddd0eef42e25cddb9aedcfe89c38d875467af.json b/graphify-out/cache/16fbf61fdc28a8b2fead5c666c5ddd0eef42e25cddb9aedcfe89c38d875467af.json new file mode 100644 index 0000000..4b7f8e0 --- /dev/null +++ b/graphify-out/cache/16fbf61fdc28a8b2fead5c666c5ddd0eef42e25cddb9aedcfe89c38d875467af.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_wiki_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_wiki_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_wiki_page_server_ts", "target": "src_routes_app_wiki_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_wiki_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "trim", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "get", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "searchPages", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "listPagesForScope", "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", "source_location": "L10"}]} \ No newline at end of file diff --git a/graphify-out/cache/1890809c25b7832bddda865f6555ca04996813a7c01686fedecb5a5420c7f33f.json b/graphify-out/cache/1890809c25b7832bddda865f6555ca04996813a7c01686fedecb5a5420c7f33f.json new file mode 100644 index 0000000..8db4c7e --- /dev/null +++ b/graphify-out/cache/1890809c25b7832bddda865f6555ca04996813a7c01686fedecb5a5420c7f33f.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_components_themetoggle_svelte", "label": "ThemeToggle.svelte", "file_type": "code", "source_file": "src\\lib\\components\\ThemeToggle.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/18ef6086f8fbdd18cacedd7cf60ba079adabdeec7f11f23aa4160099bf7429c4.json b/graphify-out/cache/18ef6086f8fbdd18cacedd7cf60ba079adabdeec7f11f23aa4160099bf7429c4.json new file mode 100644 index 0000000..69c14f9 --- /dev/null +++ b/graphify-out/cache/18ef6086f8fbdd18cacedd7cf60ba079adabdeec7f11f23aa4160099bf7429c4.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_history_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L9"}], "edges": [{"source": "src_routes_app_assets_id_history_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_history_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_history_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_id_history_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_id_history_page_server_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_assets_id_history_page_server_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_id_history_page_server_ts", "target": "src_routes_app_assets_id_history_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_assets_id_history_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L9", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L10"}, {"caller_nid": "page_server_load", "callee": "aliasedTable", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "aliasedTable", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L25"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L26"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L27"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L28"}, {"caller_nid": "page_server_load", "callee": "desc", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", "source_location": "L29"}]} \ No newline at end of file diff --git a/graphify-out/cache/194ac1448b30772273028146195763acc6e49de50674d9b8f5c5e5c71ae01483.json b/graphify-out/cache/194ac1448b30772273028146195763acc6e49de50674d9b8f5c5e5c71ae01483.json new file mode 100644 index 0000000..ab6dbf1 --- /dev/null +++ b/graphify-out/cache/194ac1448b30772273028146195763acc6e49de50674d9b8f5c5e5c71ae01483.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_layout_svelte", "label": "+layout.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/199c4bd06ebaf3e87d4f3e20b1defe1410b614dd655826572711bd70c4d3394d.json b/graphify-out/cache/199c4bd06ebaf3e87d4f3e20b1defe1410b614dd655826572711bd70c4d3394d.json new file mode 100644 index 0000000..ce281ea --- /dev/null +++ b/graphify-out/cache/199c4bd06ebaf3e87d4f3e20b1defe1410b614dd655826572711bd70c4d3394d.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_move_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L10"}], "edges": [{"source": "src_routes_app_assets_id_move_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_move_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_move_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_id_move_page_server_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_id_move_page_server_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_assets_id_move_page_server_ts", "target": "rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_id_move_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_assets_id_move_page_server_ts", "target": "src_routes_app_assets_id_move_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_assets_id_move_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L10", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "all", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L14"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L14"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L14"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L14"}, {"caller_nid": "page_server_load", "callee": "and", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L18"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L19"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L19"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L19"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L19"}, {"caller_nid": "page_server_load", "callee": "and", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L22"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L22"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L22"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L23"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "innerJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L32"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L33"}, {"caller_nid": "page_server_load", "callee": "and", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L35"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L36"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L37"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L38"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L41"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L41"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", "source_location": "L41"}]} \ No newline at end of file diff --git a/graphify-out/cache/19a16e297c72ac330c1b18b24adc12d7be9b94ab6d8c44f18d1b302c10d4a9e0.json b/graphify-out/cache/19a16e297c72ac330c1b18b24adc12d7be9b94ab6d8c44f18d1b302c10d4a9e0.json new file mode 100644 index 0000000..0dda2b1 --- /dev/null +++ b/graphify-out/cache/19a16e297c72ac330c1b18b24adc12d7be9b94ab6d8c44f18d1b302c10d4a9e0.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_new_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/1ae0be07f0e5b8f3acf6b3ba134796ab3252b140c585899f23c157d37328b037.json b/graphify-out/cache/1ae0be07f0e5b8f3acf6b3ba134796ab3252b140c585899f23c157d37328b037.json new file mode 100644 index 0000000..6105a0d --- /dev/null +++ b/graphify-out/cache/1ae0be07f0e5b8f3acf6b3ba134796ab3252b140c585899f23c157d37328b037.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_checklists_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\checklists\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/1b072d808ecaf35918eb89395e2ae1498f34bf4dfb16182e518133cfb1d5cd7f.json b/graphify-out/cache/1b072d808ecaf35918eb89395e2ae1498f34bf4dfb16182e518133cfb1d5cd7f.json new file mode 100644 index 0000000..2a4d012 --- /dev/null +++ b/graphify-out/cache/1b072d808ecaf35918eb89395e2ae1498f34bf4dfb16182e518133cfb1d5cd7f.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_markdown_ts", "label": "markdown.ts", "file_type": "code", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L1"}, {"id": "markdown_html", "label": "html()", "file_type": "code", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L10"}, {"id": "markdown_escapehtml", "label": "escapeHtml()", "file_type": "code", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L17"}, {"id": "markdown_rendermarkdown", "label": "renderMarkdown()", "file_type": "code", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L26"}], "edges": [{"source": "src_lib_server_markdown_ts", "target": "marked", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_markdown_ts", "target": "markdown_html", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L10", "weight": 1.0}, {"source": "src_lib_server_markdown_ts", "target": "markdown_escapehtml", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L17", "weight": 1.0}, {"source": "src_lib_server_markdown_ts", "target": "markdown_rendermarkdown", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L26", "weight": 1.0}, {"source": "markdown_html", "target": "markdown_escapehtml", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L12", "weight": 1.0}], "raw_calls": [{"caller_nid": "markdown_escapehtml", "callee": "replace", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L18"}, {"caller_nid": "markdown_escapehtml", "callee": "replace", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L18"}, {"caller_nid": "markdown_escapehtml", "callee": "replace", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L18"}, {"caller_nid": "markdown_escapehtml", "callee": "replace", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L18"}, {"caller_nid": "markdown_escapehtml", "callee": "replace", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L18"}, {"caller_nid": "markdown_rendermarkdown", "callee": "parse", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L28"}, {"caller_nid": "markdown_rendermarkdown", "callee": "replace", "source_file": "src\\lib\\server\\markdown.ts", "source_location": "L30"}]} \ No newline at end of file diff --git a/graphify-out/cache/1c27b906ddcfd9c855c6d0003c72db90aaac7e528745cae1e0d72584acc2928c.json b/graphify-out/cache/1c27b906ddcfd9c855c6d0003c72db90aaac7e528745cae1e0d72584acc2928c.json new file mode 100644 index 0000000..6a9c5ae --- /dev/null +++ b/graphify-out/cache/1c27b906ddcfd9c855c6d0003c72db90aaac7e528745cae1e0d72584acc2928c.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_slug_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_projects_id_wiki_slug_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_page_server_ts", "target": "markdown", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_page_server_ts", "target": "src_routes_app_projects_id_wiki_slug_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "getPageWithCurrentRevision", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "renderMarkdown", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", "source_location": "L14"}]} \ No newline at end of file diff --git a/graphify-out/cache/1d849f730ab6b967bfaa2afccdfa2adab797b76a84f60cf0aebe8e504d5784cd.json b/graphify-out/cache/1d849f730ab6b967bfaa2afccdfa2adab797b76a84f60cf0aebe8e504d5784cd.json new file mode 100644 index 0000000..5fca71f --- /dev/null +++ b/graphify-out/cache/1d849f730ab6b967bfaa2afccdfa2adab797b76a84f60cf0aebe8e504d5784cd.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/1f36e99597cdd27409703f91a668014afb3b3fa175716581790fb641c20f54aa.json b/graphify-out/cache/1f36e99597cdd27409703f91a668014afb3b3fa175716581790fb641c20f54aa.json new file mode 100644 index 0000000..532b86a --- /dev/null +++ b/graphify-out/cache/1f36e99597cdd27409703f91a668014afb3b3fa175716581790fb641c20f54aa.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_work_wpid_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L8"}], "edges": [{"source": "src_routes_app_projects_id_work_wpid_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_page_server_ts", "target": "work_packages", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_page_server_ts", "target": "tasks", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_page_server_ts", "target": "src_routes_app_projects_id_work_wpid_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L8", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "getWorkPackage", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L10"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "listTasksForWorkPackage", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", "source_location": "L12"}]} \ No newline at end of file diff --git a/graphify-out/cache/1fe7bca520af31b3663853d8813f98de4ec8c9781a657ee89c47a151a33193c9.json b/graphify-out/cache/1fe7bca520af31b3663853d8813f98de4ec8c9781a657ee89c47a151a33193c9.json new file mode 100644 index 0000000..e79032a --- /dev/null +++ b/graphify-out/cache/1fe7bca520af31b3663853d8813f98de4ec8c9781a657ee89c47a151a33193c9.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/201ee255cb81287847531f08026a498c87c5839b9b67134eceb020b0116fcac2.json b/graphify-out/cache/201ee255cb81287847531f08026a498c87c5839b9b67134eceb020b0116fcac2.json new file mode 100644 index 0000000..c8f74a4 --- /dev/null +++ b/graphify-out/cache/201ee255cb81287847531f08026a498c87c5839b9b67134eceb020b0116fcac2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_users_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L16"}], "edges": [{"source": "src_routes_app_admin_users_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_admin_users_page_server_ts", "target": "guards", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_admin_users_page_server_ts", "target": "users", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_admin_users_page_server_ts", "target": "src_routes_app_admin_users_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L12", "weight": 1.0}, {"source": "src_routes_app_admin_users_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L16", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "requireCompany", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "listCompanyUsers", "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", "source_location": "L18"}]} \ No newline at end of file diff --git a/graphify-out/cache/20b14aec6b64d299c0d20b0ee029ea855272bb519690a9c71711c9bb4e67b9a2.json b/graphify-out/cache/20b14aec6b64d299c0d20b0ee029ea855272bb519690a9c71711c9bb4e67b9a2.json new file mode 100644 index 0000000..5b96b60 --- /dev/null +++ b/graphify-out/cache/20b14aec6b64d299c0d20b0ee029ea855272bb519690a9c71711c9bb4e67b9a2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_layout_svelte", "label": "+layout.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/2a4500137b35de5175f3bb95dce23a9750945344170d2bb41267c3a6907ca0d7.json b/graphify-out/cache/2a4500137b35de5175f3bb95dce23a9750945344170d2bb41267c3a6907ca0d7.json new file mode 100644 index 0000000..cdcbac4 --- /dev/null +++ b/graphify-out/cache/2a4500137b35de5175f3bb95dce23a9750945344170d2bb41267c3a6907ca0d7.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_documents_ts", "label": "documents.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\documents.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_documents_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\documents.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_documents_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\documents.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_documents_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\documents.ts", "source_location": "L3", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/2be984f32a79cc168f414a50748d2090d38f8316aad9c780f3c58de65ec58f1d.json b/graphify-out/cache/2be984f32a79cc168f414a50748d2090d38f8316aad9c780f3c58de65ec58f1d.json new file mode 100644 index 0000000..c044c56 --- /dev/null +++ b/graphify-out/cache/2be984f32a79cc168f414a50748d2090d38f8316aad9c780f3c58de65ec58f1d.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_auth_types_ts", "label": "types.ts", "file_type": "code", "source_file": "src\\lib\\server\\auth\\types.ts", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/2ca3d86dd68e0ad333deafa71e109bec9f10bd212c5ce59086e76da65b1dbf55.json b/graphify-out/cache/2ca3d86dd68e0ad333deafa71e109bec9f10bd212c5ce59086e76da65b1dbf55.json new file mode 100644 index 0000000..d58d673 --- /dev/null +++ b/graphify-out/cache/2ca3d86dd68e0ad333deafa71e109bec9f10bd212c5ce59086e76da65b1dbf55.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_env_ts", "label": "env.ts", "file_type": "code", "source_file": "src\\lib\\server\\env.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_env_ts", "target": "config", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\env.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_env_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\env.ts", "source_location": "L2", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/2ee7ddbbf473b43fa0f37e0b7f081fcb07bc3c13fbe013f04473ee889cc742ff.json b/graphify-out/cache/2ee7ddbbf473b43fa0f37e0b7f081fcb07bc3c13fbe013f04473ee889cc742ff.json new file mode 100644 index 0000000..5df06c5 --- /dev/null +++ b/graphify-out/cache/2ee7ddbbf473b43fa0f37e0b7f081fcb07bc3c13fbe013f04473ee889cc742ff.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_assets_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/32498cff815dbe518a308d43034c08c54e642141f52005dd31eb7ec268f128a9.json b/graphify-out/cache/32498cff815dbe518a308d43034c08c54e642141f52005dd31eb7ec268f128a9.json new file mode 100644 index 0000000..23e8aa0 --- /dev/null +++ b/graphify-out/cache/32498cff815dbe518a308d43034c08c54e642141f52005dd31eb7ec268f128a9.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_layout_svelte", "label": "+layout.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/32c591ace98ffef02cfafd19670e528fbfe00724d5cf711d6924fda566f821e9.json b/graphify-out/cache/32c591ace98ffef02cfafd19670e528fbfe00724d5cf711d6924fda566f821e9.json new file mode 100644 index 0000000..c933a40 --- /dev/null +++ b/graphify-out/cache/32c591ace98ffef02cfafd19670e528fbfe00724d5cf711d6924fda566f821e9.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_layout_server_ts", "label": "+layout.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L1"}, {"id": "layout_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L11"}], "edges": [{"source": "src_routes_app_assets_id_layout_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "src_routes_app_assets_id_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L9", "weight": 1.0}, {"source": "src_routes_app_assets_id_layout_server_ts", "target": "layout_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L11", "weight": 1.0}], "raw_calls": [{"caller_nid": "layout_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L12"}, {"caller_nid": "layout_server_load", "callee": "limit", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L14"}, {"caller_nid": "layout_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L14"}, {"caller_nid": "layout_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L14"}, {"caller_nid": "layout_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L14"}, {"caller_nid": "layout_server_load", "callee": "and", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L18"}, {"caller_nid": "layout_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L19"}, {"caller_nid": "layout_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L20"}, {"caller_nid": "layout_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L21"}, {"caller_nid": "layout_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L25"}, {"caller_nid": "layout_server_load", "callee": "loadTypeWithFields", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L27"}, {"caller_nid": "layout_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L28"}, {"caller_nid": "layout_server_load", "callee": "limit", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L34"}, {"caller_nid": "layout_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L34"}, {"caller_nid": "layout_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L34"}, {"caller_nid": "layout_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L34"}, {"caller_nid": "layout_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L37"}, {"caller_nid": "layout_server_load", "callee": "limit", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L42"}, {"caller_nid": "layout_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L42"}, {"caller_nid": "layout_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L42"}, {"caller_nid": "layout_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L42"}, {"caller_nid": "layout_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L42"}, {"caller_nid": "layout_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L48"}, {"caller_nid": "layout_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L49"}, {"caller_nid": "layout_server_load", "callee": "limit", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L56"}, {"caller_nid": "layout_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L56"}, {"caller_nid": "layout_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L56"}, {"caller_nid": "layout_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L56"}, {"caller_nid": "layout_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", "source_location": "L59"}]} \ No newline at end of file diff --git a/graphify-out/cache/3359b85c230d55ab918422b0958e9330b8b6c671d674d25b13a4e92e65200e66.json b/graphify-out/cache/3359b85c230d55ab918422b0958e9330b8b6c671d674d25b13a4e92e65200e66.json new file mode 100644 index 0000000..fd6e43d --- /dev/null +++ b/graphify-out/cache/3359b85c230d55ab918422b0958e9330b8b6c671d674d25b13a4e92e65200e66.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_accounts_ts", "label": "accounts.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\accounts.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_accounts_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\accounts.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_accounts_ts", "target": "src_lib_server_db_schema_properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\accounts.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_accounts_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\accounts.ts", "source_location": "L3", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/3478eb506f311fc3ffc2529c9a149ac6c8d3a35b4edf0c6731b218fb60d21c84.json b/graphify-out/cache/3478eb506f311fc3ffc2529c9a149ac6c8d3a35b4edf0c6731b218fb60d21c84.json new file mode 100644 index 0000000..3529c8b --- /dev/null +++ b/graphify-out/cache/3478eb506f311fc3ffc2529c9a149ac6c8d3a35b4edf0c6731b218fb60d21c84.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_e2n", "label": "e2n()", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", "source_location": "L19"}], "edges": [{"source": "src_routes_app_properties_id_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_properties_id_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_properties_id_page_server_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_properties_id_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_properties_id_page_server_ts", "target": "src_routes_app_properties_id_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_properties_id_page_server_ts", "target": "page_server_e2n", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", "source_location": "L19", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/34e7c42e98479176a8f337e9c79e6ce61b2d25a813f4c16dfbc9b20ed7457011.json b/graphify-out/cache/34e7c42e98479176a8f337e9c79e6ce61b2d25a813f4c16dfbc9b20ed7457011.json new file mode 100644 index 0000000..4f12aef --- /dev/null +++ b/graphify-out/cache/34e7c42e98479176a8f337e9c79e6ce61b2d25a813f4c16dfbc9b20ed7457011.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_tenancy_ts", "label": "tenancy.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\tenancy.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_tenancy_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\tenancy.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_tenancy_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\tenancy.ts", "source_location": "L10", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/37aa523a2f87f92c04a16380d0640f8c86e671049d3b22a0fa608966de039c47.json b/graphify-out/cache/37aa523a2f87f92c04a16380d0640f8c86e671049d3b22a0fa608966de039c47.json new file mode 100644 index 0000000..bb64754 --- /dev/null +++ b/graphify-out/cache/37aa523a2f87f92c04a16380d0640f8c86e671049d3b22a0fa608966de039c47.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_asset_types_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L7"}], "edges": [{"source": "src_routes_app_admin_asset_types_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_page_server_ts", "target": "src_routes_app_admin_asset_types_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L7", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "or", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L25"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L25"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L25"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", "source_location": "L26"}]} \ No newline at end of file diff --git a/graphify-out/cache/3a1171e4d8fcf6db6372b4ce0aae0df2e75301a2a61c08937003a252044d18aa.json b/graphify-out/cache/3a1171e4d8fcf6db6372b4ce0aae0df2e75301a2a61c08937003a252044d18aa.json new file mode 100644 index 0000000..1c19681 --- /dev/null +++ b/graphify-out/cache/3a1171e4d8fcf6db6372b4ce0aae0df2e75301a2a61c08937003a252044d18aa.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_assets_ts", "label": "assets.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L1"}, {"id": "assets_loadtypewithfields", "label": "loadTypeWithFields()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L58"}, {"id": "assets_validatecustomfields", "label": "validateCustomFields()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L73"}, {"id": "assets_assertcontainer", "label": "assertContainer()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L84"}, {"id": "assets_createasset", "label": "createAsset()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L114"}, {"id": "assets_updateasset", "label": "updateAsset()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L165"}, {"id": "assets_moveasset", "label": "moveAsset()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L211"}, {"id": "assets_softdeleteasset", "label": "softDeleteAsset()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L268"}, {"id": "assets_appendassetlog", "label": "appendAssetLog()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L275"}, {"id": "assets_listassets", "label": "listAssets()", "file_type": "code", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L303"}], "edges": [{"source": "src_lib_server_services_assets_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L11", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L12", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L13", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "src_lib_server_services_rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L14", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "custom_fields", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L15", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_loadtypewithfields", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L58", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_validatecustomfields", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L73", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_assertcontainer", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L84", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_createasset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L114", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_updateasset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L165", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_moveasset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L211", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_softdeleteasset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L268", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_appendassetlog", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L275", "weight": 1.0}, {"source": "src_lib_server_services_assets_ts", "target": "assets_listassets", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L303", "weight": 1.0}, {"source": "assets_validatecustomfields", "target": "assets_loadtypewithfields", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L77", "weight": 1.0}, {"source": "assets_createasset", "target": "assets_validatecustomfields", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L115", "weight": 1.0}, {"source": "assets_createasset", "target": "assets_assertcontainer", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L116", "weight": 1.0}, {"source": "assets_updateasset", "target": "assets_validatecustomfields", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L179", "weight": 1.0}, {"source": "assets_moveasset", "target": "assets_assertcontainer", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L223", "weight": 1.0}], "raw_calls": [{"caller_nid": "assets_loadtypewithfields", "callee": "limit", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L62"}, {"caller_nid": "assets_loadtypewithfields", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L62"}, {"caller_nid": "assets_loadtypewithfields", "callee": "from", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L62"}, {"caller_nid": "assets_loadtypewithfields", "callee": "select", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L62"}, {"caller_nid": "assets_loadtypewithfields", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L62"}, {"caller_nid": "assets_loadtypewithfields", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L64"}, {"caller_nid": "assets_loadtypewithfields", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L64"}, {"caller_nid": "assets_loadtypewithfields", "callee": "from", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L64"}, {"caller_nid": "assets_loadtypewithfields", "callee": "select", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L64"}, {"caller_nid": "assets_loadtypewithfields", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L67"}, {"caller_nid": "assets_loadtypewithfields", "callee": "asc", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L68"}, {"caller_nid": "assets_validatecustomfields", "callee": "getCachedCustomFieldsSchema", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L79"}, {"caller_nid": "assets_validatecustomfields", "callee": "parse", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L80"}, {"caller_nid": "assets_assertcontainer", "callee": "limit", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L90"}, {"caller_nid": "assets_assertcontainer", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L90"}, {"caller_nid": "assets_assertcontainer", "callee": "from", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L90"}, {"caller_nid": "assets_assertcontainer", "callee": "select", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L90"}, {"caller_nid": "assets_assertcontainer", "callee": "and", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L94"}, {"caller_nid": "assets_assertcontainer", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L95"}, {"caller_nid": "assets_assertcontainer", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L96"}, {"caller_nid": "assets_assertcontainer", "callee": "isNull", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L97"}, {"caller_nid": "assets_assertcontainer", "callee": "limit", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L104"}, {"caller_nid": "assets_assertcontainer", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L104"}, {"caller_nid": "assets_assertcontainer", "callee": "from", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L104"}, {"caller_nid": "assets_assertcontainer", "callee": "select", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L104"}, {"caller_nid": "assets_assertcontainer", "callee": "and", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L108"}, {"caller_nid": "assets_assertcontainer", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L108"}, {"caller_nid": "assets_assertcontainer", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L108"}, {"caller_nid": "assets_assertcontainer", "callee": "isNull", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L108"}, {"caller_nid": "assets_createasset", "callee": "assertRoomInProperty", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L123"}, {"caller_nid": "assets_createasset", "callee": "transaction", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L127"}, {"caller_nid": "assets_updateasset", "callee": "limit", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L170"}, {"caller_nid": "assets_updateasset", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L170"}, {"caller_nid": "assets_updateasset", "callee": "from", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L170"}, {"caller_nid": "assets_updateasset", "callee": "select", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L170"}, {"caller_nid": "assets_updateasset", "callee": "and", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L173"}, {"caller_nid": "assets_updateasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L173"}, {"caller_nid": "assets_updateasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L173"}, {"caller_nid": "assets_updateasset", "callee": "isNull", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L173"}, {"caller_nid": "assets_updateasset", "callee": "assertRoomInProperty", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L191"}, {"caller_nid": "assets_updateasset", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L196"}, {"caller_nid": "assets_updateasset", "callee": "set", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L196"}, {"caller_nid": "assets_updateasset", "callee": "update", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L196"}, {"caller_nid": "assets_updateasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L208"}, {"caller_nid": "assets_moveasset", "callee": "limit", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L216"}, {"caller_nid": "assets_moveasset", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L216"}, {"caller_nid": "assets_moveasset", "callee": "from", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L216"}, {"caller_nid": "assets_moveasset", "callee": "select", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L216"}, {"caller_nid": "assets_moveasset", "callee": "and", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L219"}, {"caller_nid": "assets_moveasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L219"}, {"caller_nid": "assets_moveasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L219"}, {"caller_nid": "assets_moveasset", "callee": "isNull", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L219"}, {"caller_nid": "assets_moveasset", "callee": "assertRoomInProperty", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L230"}, {"caller_nid": "assets_moveasset", "callee": "transaction", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L241"}, {"caller_nid": "assets_softdeleteasset", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L269"}, {"caller_nid": "assets_softdeleteasset", "callee": "set", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L269"}, {"caller_nid": "assets_softdeleteasset", "callee": "update", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L269"}, {"caller_nid": "assets_softdeleteasset", "callee": "sql", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L271"}, {"caller_nid": "assets_softdeleteasset", "callee": "and", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L272"}, {"caller_nid": "assets_softdeleteasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L272"}, {"caller_nid": "assets_softdeleteasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L272"}, {"caller_nid": "assets_appendassetlog", "callee": "limit", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L281"}, {"caller_nid": "assets_appendassetlog", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L281"}, {"caller_nid": "assets_appendassetlog", "callee": "from", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L281"}, {"caller_nid": "assets_appendassetlog", "callee": "select", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L281"}, {"caller_nid": "assets_appendassetlog", "callee": "and", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L284"}, {"caller_nid": "assets_appendassetlog", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L284"}, {"caller_nid": "assets_appendassetlog", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L284"}, {"caller_nid": "assets_appendassetlog", "callee": "trim", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L287"}, {"caller_nid": "assets_appendassetlog", "callee": "values", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L288"}, {"caller_nid": "assets_appendassetlog", "callee": "insert", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L288"}, {"caller_nid": "assets_appendassetlog", "callee": "trim", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L288"}, {"caller_nid": "assets_listassets", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L304"}, {"caller_nid": "assets_listassets", "callee": "isNull", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L304"}, {"caller_nid": "assets_listassets", "callee": "push", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L305"}, {"caller_nid": "assets_listassets", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L305"}, {"caller_nid": "assets_listassets", "callee": "push", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L306"}, {"caller_nid": "assets_listassets", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L306"}, {"caller_nid": "assets_listassets", "callee": "push", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L307"}, {"caller_nid": "assets_listassets", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L307"}, {"caller_nid": "assets_listassets", "callee": "push", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L309"}, {"caller_nid": "assets_listassets", "callee": "sql", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L310"}, {"caller_nid": "assets_listassets", "callee": "trim", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L313"}, {"caller_nid": "assets_listassets", "callee": "trim", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L314"}, {"caller_nid": "assets_listassets", "callee": "push", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L315"}, {"caller_nid": "assets_listassets", "callee": "or", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L316"}, {"caller_nid": "assets_listassets", "callee": "sql", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L317"}, {"caller_nid": "assets_listassets", "callee": "sql", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L318"}, {"caller_nid": "assets_listassets", "callee": "sql", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L319"}, {"caller_nid": "assets_listassets", "callee": "offset", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "limit", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "where", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "leftJoin", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "leftJoin", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "from", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "select", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L323"}, {"caller_nid": "assets_listassets", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L342"}, {"caller_nid": "assets_listassets", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L343"}, {"caller_nid": "assets_listassets", "callee": "eq", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L344"}, {"caller_nid": "assets_listassets", "callee": "and", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L345"}, {"caller_nid": "assets_listassets", "callee": "desc", "source_file": "src\\lib\\server\\services\\assets.ts", "source_location": "L346"}]} \ No newline at end of file diff --git a/graphify-out/cache/3a768471e442c65f1ee13ef14558eab742b610cd78a71d902138463756171658.json b/graphify-out/cache/3a768471e442c65f1ee13ef14558eab742b610cd78a71d902138463756171658.json new file mode 100644 index 0000000..b97a446 --- /dev/null +++ b/graphify-out/cache/3a768471e442c65f1ee13ef14558eab742b610cd78a71d902138463756171658.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_decisions_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/3ab59f15ff1d0e7674c4dcfdf32b1cf3e7fe5f7861296492dced8b432e07a752.json b/graphify-out/cache/3ab59f15ff1d0e7674c4dcfdf32b1cf3e7fe5f7861296492dced8b432e07a752.json new file mode 100644 index 0000000..10d8d4b --- /dev/null +++ b/graphify-out/cache/3ab59f15ff1d0e7674c4dcfdf32b1cf3e7fe5f7861296492dced8b432e07a752.json @@ -0,0 +1 @@ +{"nodes": [{"id": "scripts_diag_user_ts", "label": "diag-user.ts", "file_type": "code", "source_file": "scripts\\diag-user.ts", "source_location": "L1"}, {"id": "diag_user_stripsurroundingquotes", "label": "stripSurroundingQuotes()", "file_type": "code", "source_file": "scripts\\diag-user.ts", "source_location": "L8"}, {"id": "diag_user_readarg", "label": "readArg()", "file_type": "code", "source_file": "scripts\\diag-user.ts", "source_location": "L18"}, {"id": "diag_user_main", "label": "main()", "file_type": "code", "source_file": "scripts\\diag-user.ts", "source_location": "L23"}], "edges": [{"source": "scripts_diag_user_ts", "target": "config", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L1", "weight": 1.0}, {"source": "scripts_diag_user_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L2", "weight": 1.0}, {"source": "scripts_diag_user_ts", "target": "src_lib_server_db_client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L3", "weight": 1.0}, {"source": "scripts_diag_user_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L4", "weight": 1.0}, {"source": "scripts_diag_user_ts", "target": "src_lib_server_auth_password", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L5", "weight": 1.0}, {"source": "scripts_diag_user_ts", "target": "src_lib_utils_email", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L6", "weight": 1.0}, {"source": "scripts_diag_user_ts", "target": "diag_user_stripsurroundingquotes", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L8", "weight": 1.0}, {"source": "scripts_diag_user_ts", "target": "diag_user_readarg", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L18", "weight": 1.0}, {"source": "scripts_diag_user_ts", "target": "diag_user_main", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L23", "weight": 1.0}, {"source": "diag_user_readarg", "target": "diag_user_stripsurroundingquotes", "relation": "calls", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L20", "weight": 1.0}, {"source": "diag_user_main", "target": "diag_user_readarg", "relation": "calls", "confidence": "EXTRACTED", "source_file": "scripts\\diag-user.ts", "source_location": "L24", "weight": 1.0}], "raw_calls": [{"caller_nid": "diag_user_stripsurroundingquotes", "callee": "slice", "source_file": "scripts\\diag-user.ts", "source_location": "L13"}, {"caller_nid": "diag_user_readarg", "callee": "indexOf", "source_file": "scripts\\diag-user.ts", "source_location": "L19"}, {"caller_nid": "diag_user_main", "callee": "error", "source_file": "scripts\\diag-user.ts", "source_location": "L28"}, {"caller_nid": "diag_user_main", "callee": "exit", "source_file": "scripts\\diag-user.ts", "source_location": "L29"}, {"caller_nid": "diag_user_main", "callee": "normalizeEmail", "source_file": "scripts\\diag-user.ts", "source_location": "L32"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L33"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L34"}, {"caller_nid": "diag_user_main", "callee": "stringify", "source_file": "scripts\\diag-user.ts", "source_location": "L34"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L35"}, {"caller_nid": "diag_user_main", "callee": "stringify", "source_file": "scripts\\diag-user.ts", "source_location": "L35"}, {"caller_nid": "diag_user_main", "callee": "limit", "source_file": "scripts\\diag-user.ts", "source_location": "L37"}, {"caller_nid": "diag_user_main", "callee": "where", "source_file": "scripts\\diag-user.ts", "source_location": "L37"}, {"caller_nid": "diag_user_main", "callee": "from", "source_file": "scripts\\diag-user.ts", "source_location": "L37"}, {"caller_nid": "diag_user_main", "callee": "select", "source_file": "scripts\\diag-user.ts", "source_location": "L37"}, {"caller_nid": "diag_user_main", "callee": "eq", "source_file": "scripts\\diag-user.ts", "source_location": "L40"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L44"}, {"caller_nid": "diag_user_main", "callee": "from", "source_file": "scripts\\diag-user.ts", "source_location": "L45"}, {"caller_nid": "diag_user_main", "callee": "select", "source_file": "scripts\\diag-user.ts", "source_location": "L45"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L48"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L49"}, {"caller_nid": "diag_user_main", "callee": "end", "source_file": "scripts\\diag-user.ts", "source_location": "L50"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L54"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L55"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L56"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L57"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L58"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L59"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L60"}, {"caller_nid": "diag_user_main", "callee": "slice", "source_file": "scripts\\diag-user.ts", "source_location": "L60"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L61"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L62"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L63"}, {"caller_nid": "diag_user_main", "callee": "where", "source_file": "scripts\\diag-user.ts", "source_location": "L65"}, {"caller_nid": "diag_user_main", "callee": "innerJoin", "source_file": "scripts\\diag-user.ts", "source_location": "L65"}, {"caller_nid": "diag_user_main", "callee": "from", "source_file": "scripts\\diag-user.ts", "source_location": "L65"}, {"caller_nid": "diag_user_main", "callee": "select", "source_file": "scripts\\diag-user.ts", "source_location": "L65"}, {"caller_nid": "diag_user_main", "callee": "eq", "source_file": "scripts\\diag-user.ts", "source_location": "L68"}, {"caller_nid": "diag_user_main", "callee": "eq", "source_file": "scripts\\diag-user.ts", "source_location": "L69"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L71"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L72"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L73"}, {"caller_nid": "diag_user_main", "callee": "where", "source_file": "scripts\\diag-user.ts", "source_location": "L75"}, {"caller_nid": "diag_user_main", "callee": "from", "source_file": "scripts\\diag-user.ts", "source_location": "L75"}, {"caller_nid": "diag_user_main", "callee": "select", "source_file": "scripts\\diag-user.ts", "source_location": "L75"}, {"caller_nid": "diag_user_main", "callee": "eq", "source_file": "scripts\\diag-user.ts", "source_location": "L75"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L76"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L79"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L81"}, {"caller_nid": "diag_user_main", "callee": "verifyPassword", "source_file": "scripts\\diag-user.ts", "source_location": "L84"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L85"}, {"caller_nid": "diag_user_main", "callee": "log", "source_file": "scripts\\diag-user.ts", "source_location": "L87"}, {"caller_nid": "diag_user_main", "callee": "end", "source_file": "scripts\\diag-user.ts", "source_location": "L92"}]} \ No newline at end of file diff --git a/graphify-out/cache/3c04dd646340867784ea535d717b497f6b3a941cb62f1a673694a8ecce4322b4.json b/graphify-out/cache/3c04dd646340867784ea535d717b497f6b3a941cb62f1a673694a8ecce4322b4.json new file mode 100644 index 0000000..3301474 --- /dev/null +++ b/graphify-out/cache/3c04dd646340867784ea535d717b497f6b3a941cb62f1a673694a8ecce4322b4.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_hooks_server_ts", "label": "hooks.server.ts", "file_type": "code", "source_file": "src\\hooks.server.ts", "source_location": "L1"}, {"id": "hooks_server_handle", "label": "handle()", "file_type": "code", "source_file": "src\\hooks.server.ts", "source_location": "L9"}], "edges": [{"source": "src_hooks_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\hooks.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_hooks_server_ts", "target": "session", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\hooks.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_hooks_server_ts", "target": "hooks_server_handle", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\hooks.server.ts", "source_location": "L9", "weight": 1.0}], "raw_calls": [{"caller_nid": "hooks_server_handle", "callee": "get", "source_file": "src\\hooks.server.ts", "source_location": "L14"}, {"caller_nid": "hooks_server_handle", "callee": "validateSession", "source_file": "src\\hooks.server.ts", "source_location": "L16"}, {"caller_nid": "hooks_server_handle", "callee": "refreshSession", "source_file": "src\\hooks.server.ts", "source_location": "L23"}, {"caller_nid": "hooks_server_handle", "callee": "set", "source_file": "src\\hooks.server.ts", "source_location": "L24"}, {"caller_nid": "hooks_server_handle", "callee": "includes", "source_file": "src\\hooks.server.ts", "source_location": "L28"}, {"caller_nid": "hooks_server_handle", "callee": "delete", "source_file": "src\\hooks.server.ts", "source_location": "L33"}, {"caller_nid": "hooks_server_handle", "callee": "resolve", "source_file": "src\\hooks.server.ts", "source_location": "L37"}]} \ No newline at end of file diff --git a/graphify-out/cache/3e70fc2f3ba1c9d5798ed63600c898f27281cafd99147da953edf6e7bed0440c.json b/graphify-out/cache/3e70fc2f3ba1c9d5798ed63600c898f27281cafd99147da953edf6e7bed0440c.json new file mode 100644 index 0000000..9b03de5 --- /dev/null +++ b/graphify-out/cache/3e70fc2f3ba1c9d5798ed63600c898f27281cafd99147da953edf6e7bed0440c.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_assets_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_projects_id_assets_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_assets_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_assets_page_server_ts", "target": "src_routes_app_projects_id_assets_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_assets_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "listAssets", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", "source_location": "L7"}]} \ No newline at end of file diff --git a/graphify-out/cache/413a47a934aa569b6d6ee2bc77f9cb4c327bc5ede891a2ea7ec5ba9f3edd6805.json b/graphify-out/cache/413a47a934aa569b6d6ee2bc77f9cb4c327bc5ede891a2ea7ec5ba9f3edd6805.json new file mode 100644 index 0000000..a08bb40 --- /dev/null +++ b/graphify-out/cache/413a47a934aa569b6d6ee2bc77f9cb4c327bc5ede891a2ea7ec5ba9f3edd6805.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_error_svelte", "label": "+error.svelte", "file_type": "code", "source_file": "src\\routes\\+error.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/41546815917b41860abf09c3d30dcda2768ac1aad01a68abe0a8a7b89bf245cf.json b/graphify-out/cache/41546815917b41860abf09c3d30dcda2768ac1aad01a68abe0a8a7b89bf245cf.json new file mode 100644 index 0000000..10feaf3 --- /dev/null +++ b/graphify-out/cache/41546815917b41860abf09c3d30dcda2768ac1aad01a68abe0a8a7b89bf245cf.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/4278dbc640a39f752e9d97e818e088199179e24fc9b7301d8e605526b1da38de.json b/graphify-out/cache/4278dbc640a39f752e9d97e818e088199179e24fc9b7301d8e605526b1da38de.json new file mode 100644 index 0000000..4b6ccba --- /dev/null +++ b/graphify-out/cache/4278dbc640a39f752e9d97e818e088199179e24fc9b7301d8e605526b1da38de.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_roles_ts", "label": "roles.ts", "file_type": "code", "source_file": "src\\lib\\roles.ts", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/4d9325cb3e2f8ba43c217aa23361f46db462eba487bad9d7e6511ca68da10948.json b/graphify-out/cache/4d9325cb3e2f8ba43c217aa23361f46db462eba487bad9d7e6511ca68da10948.json new file mode 100644 index 0000000..729fb13 --- /dev/null +++ b/graphify-out/cache/4d9325cb3e2f8ba43c217aa23361f46db462eba487bad9d7e6511ca68da10948.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_documents_ts", "label": "documents.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L1"}, {"id": "documents_assertscope", "label": "assertScope()", "file_type": "code", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L20"}, {"id": "documents_uploaddocument", "label": "uploadDocument()", "file_type": "code", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L47"}, {"id": "documents_listdocumentsforscope", "label": "listDocumentsForScope()", "file_type": "code", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L75"}, {"id": "documents_getdocument", "label": "getDocument()", "file_type": "code", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L93"}, {"id": "documents_deletedocument", "label": "deleteDocument()", "file_type": "code", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L102"}, {"id": "documents_signedurlfordocument", "label": "signedUrlForDocument()", "file_type": "code", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L113"}], "edges": [{"source": "src_lib_server_services_documents_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "documents", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "storage", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "documents_assertscope", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L20", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "documents_uploaddocument", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L47", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "documents_listdocumentsforscope", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L75", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "documents_getdocument", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L93", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "documents_deletedocument", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L102", "weight": 1.0}, {"source": "src_lib_server_services_documents_ts", "target": "documents_signedurlfordocument", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L113", "weight": 1.0}, {"source": "documents_uploaddocument", "target": "documents_assertscope", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L48", "weight": 1.0}, {"source": "documents_deletedocument", "target": "documents_getdocument", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L103", "weight": 1.0}], "raw_calls": [{"caller_nid": "documents_assertscope", "callee": "limit", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L26"}, {"caller_nid": "documents_assertscope", "callee": "where", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L26"}, {"caller_nid": "documents_assertscope", "callee": "from", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L26"}, {"caller_nid": "documents_assertscope", "callee": "select", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L26"}, {"caller_nid": "documents_assertscope", "callee": "and", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L29"}, {"caller_nid": "documents_assertscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L29"}, {"caller_nid": "documents_assertscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L29"}, {"caller_nid": "documents_assertscope", "callee": "limit", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L35"}, {"caller_nid": "documents_assertscope", "callee": "where", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L35"}, {"caller_nid": "documents_assertscope", "callee": "from", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L35"}, {"caller_nid": "documents_assertscope", "callee": "select", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L35"}, {"caller_nid": "documents_assertscope", "callee": "and", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L38"}, {"caller_nid": "documents_assertscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L38"}, {"caller_nid": "documents_assertscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L38"}, {"caller_nid": "documents_uploaddocument", "callee": "getStorage", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L50"}, {"caller_nid": "documents_uploaddocument", "callee": "generateKey", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L51"}, {"caller_nid": "documents_uploaddocument", "callee": "put", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L52"}, {"caller_nid": "documents_uploaddocument", "callee": "returning", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L58"}, {"caller_nid": "documents_uploaddocument", "callee": "values", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L58"}, {"caller_nid": "documents_uploaddocument", "callee": "insert", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L58"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L80"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "where", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L80"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "from", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L80"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "select", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L80"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "and", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L84"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L85"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L86"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L87"}, {"caller_nid": "documents_listdocumentsforscope", "callee": "desc", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L90"}, {"caller_nid": "documents_getdocument", "callee": "limit", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L94"}, {"caller_nid": "documents_getdocument", "callee": "where", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L94"}, {"caller_nid": "documents_getdocument", "callee": "from", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L94"}, {"caller_nid": "documents_getdocument", "callee": "select", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L94"}, {"caller_nid": "documents_getdocument", "callee": "and", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L97"}, {"caller_nid": "documents_getdocument", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L97"}, {"caller_nid": "documents_getdocument", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L97"}, {"caller_nid": "documents_deletedocument", "callee": "getStorage", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L105"}, {"caller_nid": "documents_deletedocument", "callee": "catch", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L106"}, {"caller_nid": "documents_deletedocument", "callee": "delete", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L106"}, {"caller_nid": "documents_deletedocument", "callee": "where", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L110"}, {"caller_nid": "documents_deletedocument", "callee": "delete", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L110"}, {"caller_nid": "documents_deletedocument", "callee": "eq", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L110"}, {"caller_nid": "documents_signedurlfordocument", "callee": "getStorage", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L117"}, {"caller_nid": "documents_signedurlfordocument", "callee": "getSignedUrl", "source_file": "src\\lib\\server\\services\\documents.ts", "source_location": "L118"}]} \ No newline at end of file diff --git a/graphify-out/cache/50c2f7474f68687912186fe3425153402c0f040d8183f22ae0a67208659f10f8.json b/graphify-out/cache/50c2f7474f68687912186fe3425153402c0f040d8183f22ae0a67208659f10f8.json new file mode 100644 index 0000000..25ebdf5 --- /dev/null +++ b/graphify-out/cache/50c2f7474f68687912186fe3425153402c0f040d8183f22ae0a67208659f10f8.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_assets_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_properties_id_assets_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_properties_id_assets_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_properties_id_assets_page_server_ts", "target": "src_routes_app_properties_id_assets_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_properties_id_assets_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "listAssets", "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", "source_location": "L7"}]} \ No newline at end of file diff --git a/graphify-out/cache/539bfad9524546b64be2da01d72d27c6f0ca9c036b3ea91ad257e55b24cf0cbf.json b/graphify-out/cache/539bfad9524546b64be2da01d72d27c6f0ca9c036b3ea91ad257e55b24cf0cbf.json new file mode 100644 index 0000000..2fbfcee --- /dev/null +++ b/graphify-out/cache/539bfad9524546b64be2da01d72d27c6f0ca9c036b3ea91ad257e55b24cf0cbf.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_auth_guards_ts", "label": "guards.ts", "file_type": "code", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L1"}, {"id": "guards_requirecompany", "label": "requireCompany()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L8"}, {"id": "guards_requireadmin", "label": "requireAdmin()", "file_type": "code", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L22"}], "edges": [{"source": "src_lib_server_auth_guards_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_auth_guards_ts", "target": "src_lib_server_auth_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_auth_guards_ts", "target": "guards_requirecompany", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_lib_server_auth_guards_ts", "target": "guards_requireadmin", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L22", "weight": 1.0}, {"source": "guards_requireadmin", "target": "guards_requirecompany", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L27", "weight": 1.0}], "raw_calls": [{"caller_nid": "guards_requirecompany", "callee": "error", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L13"}, {"caller_nid": "guards_requirecompany", "callee": "error", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L14"}, {"caller_nid": "guards_requireadmin", "callee": "error", "source_file": "src\\lib\\server\\auth\\guards.ts", "source_location": "L29"}]} \ No newline at end of file diff --git a/graphify-out/cache/539c626f2fd59d987a7f1ac437d0219a17ef3f378bd96e71ccb22b97aeb39e0a.json b/graphify-out/cache/539c626f2fd59d987a7f1ac437d0219a17ef3f378bd96e71ccb22b97aeb39e0a.json new file mode 100644 index 0000000..81f8f76 --- /dev/null +++ b/graphify-out/cache/539c626f2fd59d987a7f1ac437d0219a17ef3f378bd96e71ccb22b97aeb39e0a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_history_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/53f1697fab316e15cc655b442a69ae0d07ac9314123f4506760079c282863095.json b/graphify-out/cache/53f1697fab316e15cc655b442a69ae0d07ac9314123f4506760079c282863095.json new file mode 100644 index 0000000..92bcec8 --- /dev/null +++ b/graphify-out/cache/53f1697fab316e15cc655b442a69ae0d07ac9314123f4506760079c282863095.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_storage_local_ts", "label": "local.ts", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L1"}, {"id": "local_localdiskstorage", "label": "LocalDiskStorage", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L15"}, {"id": "local_localdiskstorage_constructor", "label": ".constructor()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L16"}, {"id": "local_localdiskstorage_resolve", "label": ".resolve()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L22"}, {"id": "local_localdiskstorage_put", "label": ".put()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L29"}, {"id": "local_localdiskstorage_get", "label": ".get()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L67"}, {"id": "local_localdiskstorage_head", "label": ".head()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L77"}, {"id": "local_localdiskstorage_delete", "label": ".delete()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L82"}, {"id": "local_localdiskstorage_generatekey", "label": ".generateKey()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L88"}, {"id": "local_localdiskstorage_getsignedurl", "label": ".getSignedUrl()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L92"}, {"id": "local_localdiskstorage_verifysignedurl", "label": ".verifySignedUrl()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L108"}], "edges": [{"source": "src_lib_server_storage_local_ts", "target": "node_fs", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_storage_local_ts", "target": "promises", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_storage_local_ts", "target": "node_crypto", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_storage_local_ts", "target": "promises", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_storage_local_ts", "target": "node_path", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_storage_local_ts", "target": "src_lib_server_storage_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_lib_server_storage_local_ts", "target": "local_localdiskstorage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L15", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_constructor", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L16", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_resolve", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L22", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_put", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L29", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_get", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L67", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_head", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L77", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_delete", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L82", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_generatekey", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L88", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_getsignedurl", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L92", "weight": 1.0}, {"source": "local_localdiskstorage", "target": "local_localdiskstorage_verifysignedurl", "relation": "method", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L108", "weight": 1.0}, {"source": "local_localdiskstorage_put", "target": "local_localdiskstorage_resolve", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L30", "weight": 1.0}, {"source": "local_localdiskstorage_get", "target": "local_localdiskstorage_resolve", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L68", "weight": 1.0}, {"source": "local_localdiskstorage_head", "target": "local_localdiskstorage_resolve", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L78", "weight": 1.0}, {"source": "local_localdiskstorage_delete", "target": "local_localdiskstorage_resolve", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L83", "weight": 1.0}, {"source": "local_localdiskstorage_verifysignedurl", "target": "local_localdiskstorage_get", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L109", "weight": 1.0}], "raw_calls": [{"caller_nid": "local_localdiskstorage_resolve", "callee": "includes", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L23"}, {"caller_nid": "local_localdiskstorage_resolve", "callee": "isAbsolute", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L23"}, {"caller_nid": "local_localdiskstorage_resolve", "callee": "join", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L26"}, {"caller_nid": "local_localdiskstorage_put", "callee": "mkdir", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L31"}, {"caller_nid": "local_localdiskstorage_put", "callee": "dirname", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L31"}, {"caller_nid": "local_localdiskstorage_put", "callee": "createHash", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L32"}, {"caller_nid": "local_localdiskstorage_put", "callee": "createWriteStream", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L34"}, {"caller_nid": "local_localdiskstorage_put", "callee": "isBuffer", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L36"}, {"caller_nid": "local_localdiskstorage_put", "callee": "update", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L37"}, {"caller_nid": "local_localdiskstorage_put", "callee": "end", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L39"}, {"caller_nid": "local_localdiskstorage_put", "callee": "pipeline", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L45"}, {"caller_nid": "local_localdiskstorage_put", "callee": "update", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L50"}, {"caller_nid": "local_localdiskstorage_put", "callee": "digest", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L59"}, {"caller_nid": "local_localdiskstorage_put", "callee": "catch", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L61"}, {"caller_nid": "local_localdiskstorage_put", "callee": "unlink", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L61"}, {"caller_nid": "local_localdiskstorage_get", "callee": "stat", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L69"}, {"caller_nid": "local_localdiskstorage_get", "callee": "createReadStream", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L71"}, {"caller_nid": "local_localdiskstorage_head", "callee": "stat", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L78"}, {"caller_nid": "local_localdiskstorage_delete", "callee": "catch", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L83"}, {"caller_nid": "local_localdiskstorage_delete", "callee": "unlink", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L83"}, {"caller_nid": "local_localdiskstorage_generatekey", "callee": "generateStorageKey", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L89"}, {"caller_nid": "local_localdiskstorage_getsignedurl", "callee": "floor", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L93"}, {"caller_nid": "local_localdiskstorage_getsignedurl", "callee": "now", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L93"}, {"caller_nid": "local_localdiskstorage_getsignedurl", "callee": "digest", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L97"}, {"caller_nid": "local_localdiskstorage_getsignedurl", "callee": "update", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L97"}, {"caller_nid": "local_localdiskstorage_getsignedurl", "callee": "createHmac", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L97"}, {"caller_nid": "local_localdiskstorage_getsignedurl", "callee": "String", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L100"}, {"caller_nid": "local_localdiskstorage_getsignedurl", "callee": "toString", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L105"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "parseInt", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L115"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "isFinite", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L116"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "floor", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L116"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "now", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L116"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "digest", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L120"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "update", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L120"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "createHmac", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L120"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "charCodeAt", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L124"}, {"caller_nid": "local_localdiskstorage_verifysignedurl", "callee": "charCodeAt", "source_file": "src\\lib\\server\\storage\\local.ts", "source_location": "L124"}]} \ No newline at end of file diff --git a/graphify-out/cache/542d17efb6763ea635eeab646bba8910ae2d881ba9072f52bc2cc8a1a15213e2.json b/graphify-out/cache/542d17efb6763ea635eeab646bba8910ae2d881ba9072f52bc2cc8a1a15213e2.json new file mode 100644 index 0000000..a2f1e5a --- /dev/null +++ b/graphify-out/cache/542d17efb6763ea635eeab646bba8910ae2d881ba9072f52bc2cc8a1a15213e2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_auth_login_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L22"}], "edges": [{"source": "src_routes_auth_login_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "password", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "session", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "email", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L13", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "src_routes_auth_login_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L14", "weight": 1.0}, {"source": "src_routes_auth_login_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L22", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "get", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "redirect", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L25"}, {"caller_nid": "page_server_load", "callee": "get", "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", "source_location": "L27"}]} \ No newline at end of file diff --git a/graphify-out/cache/5488d9d9c630f6c8c77fbfb1cd3afccc9deb53e011c81f37ff4183000801474d.json b/graphify-out/cache/5488d9d9c630f6c8c77fbfb1cd3afccc9deb53e011c81f37ff4183000801474d.json new file mode 100644 index 0000000..3cf45d1 --- /dev/null +++ b/graphify-out/cache/5488d9d9c630f6c8c77fbfb1cd3afccc9deb53e011c81f37ff4183000801474d.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_slug_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/557c3a6706128ffc4760a8825c7a14e5b15f1dd771ddbb2ab30860e56d0237fe.json b/graphify-out/cache/557c3a6706128ffc4760a8825c7a14e5b15f1dd771ddbb2ab30860e56d0237fe.json new file mode 100644 index 0000000..2dec6d6 --- /dev/null +++ b/graphify-out/cache/557c3a6706128ffc4760a8825c7a14e5b15f1dd771ddbb2ab30860e56d0237fe.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_company_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\company\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/55b458c2e5ca50107dc3c3daf55e02b044874cec9cf2fe885689e2d058071c04.json b/graphify-out/cache/55b458c2e5ca50107dc3c3daf55e02b044874cec9cf2fe885689e2d058071c04.json new file mode 100644 index 0000000..bfea7bb --- /dev/null +++ b/graphify-out/cache/55b458c2e5ca50107dc3c3daf55e02b044874cec9cf2fe885689e2d058071c04.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_rooms_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/55df8923ec441748943704795d9ef5e5ec10c3c0343a14abacc9ae55b7fe49f0.json b/graphify-out/cache/55df8923ec441748943704795d9ef5e5ec10c3c0343a14abacc9ae55b7fe49f0.json new file mode 100644 index 0000000..7ee724f --- /dev/null +++ b/graphify-out/cache/55df8923ec441748943704795d9ef5e5ec10c3c0343a14abacc9ae55b7fe49f0.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_users_ts", "label": "users.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L1"}, {"id": "users_listcompanyusers", "label": "listCompanyUsers()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L20"}, {"id": "users_countadmins", "label": "countAdmins()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L39"}, {"id": "users_createuserandaddtocompany", "label": "createUserAndAddToCompany()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L67"}, {"id": "users_updatedisplayname", "label": "updateDisplayName()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L119"}, {"id": "users_setuserroleincompany", "label": "setUserRoleInCompany()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L130"}, {"id": "users_removeuserfromcompany", "label": "removeUserFromCompany()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L154"}, {"id": "users_setuseractive", "label": "setUserActive()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L176"}, {"id": "users_resetuserpassword", "label": "resetUserPassword()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L199"}, {"id": "users_assertmembership", "label": "assertMembership()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L212"}, {"id": "users_isself", "label": "isSelf()", "file_type": "code", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L223"}], "edges": [{"source": "src_lib_server_services_users_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "password", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "email", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_listcompanyusers", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L20", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_countadmins", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L39", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_createuserandaddtocompany", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L67", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_updatedisplayname", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L119", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_setuserroleincompany", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L130", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_removeuserfromcompany", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L154", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_setuseractive", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L176", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_resetuserpassword", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L199", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_assertmembership", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L212", "weight": 1.0}, {"source": "src_lib_server_services_users_ts", "target": "users_isself", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L223", "weight": 1.0}, {"source": "users_updatedisplayname", "target": "users_assertmembership", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L124", "weight": 1.0}, {"source": "users_setuserroleincompany", "target": "users_assertmembership", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L135", "weight": 1.0}, {"source": "users_setuserroleincompany", "target": "users_countadmins", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L143", "weight": 1.0}, {"source": "users_removeuserfromcompany", "target": "users_assertmembership", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L158", "weight": 1.0}, {"source": "users_removeuserfromcompany", "target": "users_countadmins", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L166", "weight": 1.0}, {"source": "users_setuseractive", "target": "users_assertmembership", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L181", "weight": 1.0}, {"source": "users_setuseractive", "target": "users_countadmins", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L190", "weight": 1.0}, {"source": "users_resetuserpassword", "target": "users_assertmembership", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L204", "weight": 1.0}], "raw_calls": [{"caller_nid": "users_listcompanyusers", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L21"}, {"caller_nid": "users_listcompanyusers", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L21"}, {"caller_nid": "users_listcompanyusers", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L21"}, {"caller_nid": "users_listcompanyusers", "callee": "from", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L21"}, {"caller_nid": "users_listcompanyusers", "callee": "select", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L21"}, {"caller_nid": "users_listcompanyusers", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L33"}, {"caller_nid": "users_listcompanyusers", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L34"}, {"caller_nid": "users_listcompanyusers", "callee": "desc", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L35"}, {"caller_nid": "users_listcompanyusers", "callee": "desc", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L35"}, {"caller_nid": "users_countadmins", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L40"}, {"caller_nid": "users_countadmins", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L40"}, {"caller_nid": "users_countadmins", "callee": "from", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L40"}, {"caller_nid": "users_countadmins", "callee": "select", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L40"}, {"caller_nid": "users_countadmins", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L43"}, {"caller_nid": "users_countadmins", "callee": "and", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L45"}, {"caller_nid": "users_countadmins", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L46"}, {"caller_nid": "users_countadmins", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L47"}, {"caller_nid": "users_countadmins", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L48"}, {"caller_nid": "users_createuserandaddtocompany", "callee": "normalizeEmail", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L70"}, {"caller_nid": "users_createuserandaddtocompany", "callee": "trim", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L71"}, {"caller_nid": "users_createuserandaddtocompany", "callee": "transaction", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L77"}, {"caller_nid": "users_updatedisplayname", "callee": "trim", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L125"}, {"caller_nid": "users_updatedisplayname", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L127"}, {"caller_nid": "users_updatedisplayname", "callee": "set", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L127"}, {"caller_nid": "users_updatedisplayname", "callee": "update", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L127"}, {"caller_nid": "users_updatedisplayname", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L127"}, {"caller_nid": "users_setuserroleincompany", "callee": "limit", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L136"}, {"caller_nid": "users_setuserroleincompany", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L136"}, {"caller_nid": "users_setuserroleincompany", "callee": "from", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L136"}, {"caller_nid": "users_setuserroleincompany", "callee": "select", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L136"}, {"caller_nid": "users_setuserroleincompany", "callee": "and", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L139"}, {"caller_nid": "users_setuserroleincompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L139"}, {"caller_nid": "users_setuserroleincompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L139"}, {"caller_nid": "users_setuserroleincompany", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L148"}, {"caller_nid": "users_setuserroleincompany", "callee": "set", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L148"}, {"caller_nid": "users_setuserroleincompany", "callee": "update", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L148"}, {"caller_nid": "users_setuserroleincompany", "callee": "and", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L151"}, {"caller_nid": "users_setuserroleincompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L151"}, {"caller_nid": "users_setuserroleincompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L151"}, {"caller_nid": "users_removeuserfromcompany", "callee": "limit", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L159"}, {"caller_nid": "users_removeuserfromcompany", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L159"}, {"caller_nid": "users_removeuserfromcompany", "callee": "from", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L159"}, {"caller_nid": "users_removeuserfromcompany", "callee": "select", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L159"}, {"caller_nid": "users_removeuserfromcompany", "callee": "and", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L162"}, {"caller_nid": "users_removeuserfromcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L162"}, {"caller_nid": "users_removeuserfromcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L162"}, {"caller_nid": "users_removeuserfromcompany", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L171"}, {"caller_nid": "users_removeuserfromcompany", "callee": "delete", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L171"}, {"caller_nid": "users_removeuserfromcompany", "callee": "and", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L173"}, {"caller_nid": "users_removeuserfromcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L173"}, {"caller_nid": "users_removeuserfromcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L173"}, {"caller_nid": "users_setuseractive", "callee": "limit", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L184"}, {"caller_nid": "users_setuseractive", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L184"}, {"caller_nid": "users_setuseractive", "callee": "from", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L184"}, {"caller_nid": "users_setuseractive", "callee": "select", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L184"}, {"caller_nid": "users_setuseractive", "callee": "and", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L187"}, {"caller_nid": "users_setuseractive", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L187"}, {"caller_nid": "users_setuseractive", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L187"}, {"caller_nid": "users_setuseractive", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L196"}, {"caller_nid": "users_setuseractive", "callee": "set", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L196"}, {"caller_nid": "users_setuseractive", "callee": "update", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L196"}, {"caller_nid": "users_setuseractive", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L196"}, {"caller_nid": "users_resetuserpassword", "callee": "hashPassword", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L208"}, {"caller_nid": "users_resetuserpassword", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L209"}, {"caller_nid": "users_resetuserpassword", "callee": "set", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L209"}, {"caller_nid": "users_resetuserpassword", "callee": "update", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L209"}, {"caller_nid": "users_resetuserpassword", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L209"}, {"caller_nid": "users_assertmembership", "callee": "limit", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L213"}, {"caller_nid": "users_assertmembership", "callee": "where", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L213"}, {"caller_nid": "users_assertmembership", "callee": "from", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L213"}, {"caller_nid": "users_assertmembership", "callee": "select", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L213"}, {"caller_nid": "users_assertmembership", "callee": "and", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L216"}, {"caller_nid": "users_assertmembership", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L216"}, {"caller_nid": "users_assertmembership", "callee": "eq", "source_file": "src\\lib\\server\\services\\users.ts", "source_location": "L216"}]} \ No newline at end of file diff --git a/graphify-out/cache/576c9898f3c65c63277aae3f43da4faf5018a14d3b53ee6371098c8e60152c9e.json b/graphify-out/cache/576c9898f3c65c63277aae3f43da4faf5018a14d3b53ee6371098c8e60152c9e.json new file mode 100644 index 0000000..70d53c6 --- /dev/null +++ b/graphify-out/cache/576c9898f3c65c63277aae3f43da4faf5018a14d3b53ee6371098c8e60152c9e.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_checklists_ts", "label": "checklists.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L1"}, {"id": "checklists_listtemplates", "label": "listTemplates()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L16"}, {"id": "checklists_gettemplate", "label": "getTemplate()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L38"}, {"id": "checklists_createtemplate", "label": "createTemplate()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L56"}, {"id": "checklists_updatetemplate", "label": "updateTemplate()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L74"}, {"id": "checklists_deletetemplate", "label": "deleteTemplate()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L88"}, {"id": "checklists_addtemplateitem", "label": "addTemplateItem()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L94"}, {"id": "checklists_removetemplateitem", "label": "removeTemplateItem()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L111"}, {"id": "checklists_instantiatechecklist", "label": "instantiateChecklist()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L123"}, {"id": "checklists_getinstance", "label": "getInstance()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L180"}, {"id": "checklists_setitemdone", "label": "setItemDone()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L201"}, {"id": "checklists_completeinstance", "label": "completeInstance()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L222"}, {"id": "checklists_listinstancesforscope", "label": "listInstancesForScope()", "file_type": "code", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L238"}], "edges": [{"source": "src_lib_server_services_checklists_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_listtemplates", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L16", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_gettemplate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L38", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_createtemplate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L56", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_updatetemplate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L74", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_deletetemplate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L88", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_addtemplateitem", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L94", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_removetemplateitem", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L111", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_instantiatechecklist", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L123", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_getinstance", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L180", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_setitemdone", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L201", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_completeinstance", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L222", "weight": 1.0}, {"source": "src_lib_server_services_checklists_ts", "target": "checklists_listinstancesforscope", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L238", "weight": 1.0}, {"source": "checklists_addtemplateitem", "target": "checklists_gettemplate", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L100", "weight": 1.0}, {"source": "checklists_removetemplateitem", "target": "checklists_gettemplate", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L116", "weight": 1.0}, {"source": "checklists_setitemdone", "target": "checklists_getinstance", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L209", "weight": 1.0}], "raw_calls": [{"caller_nid": "checklists_listtemplates", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L19"}, {"caller_nid": "checklists_listtemplates", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L19"}, {"caller_nid": "checklists_listtemplates", "callee": "from", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L19"}, {"caller_nid": "checklists_listtemplates", "callee": "select", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L19"}, {"caller_nid": "checklists_listtemplates", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L34"}, {"caller_nid": "checklists_listtemplates", "callee": "asc", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L35"}, {"caller_nid": "checklists_gettemplate", "callee": "limit", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L42"}, {"caller_nid": "checklists_gettemplate", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L42"}, {"caller_nid": "checklists_gettemplate", "callee": "from", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L42"}, {"caller_nid": "checklists_gettemplate", "callee": "select", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L42"}, {"caller_nid": "checklists_gettemplate", "callee": "and", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L45"}, {"caller_nid": "checklists_gettemplate", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L45"}, {"caller_nid": "checklists_gettemplate", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L45"}, {"caller_nid": "checklists_gettemplate", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L48"}, {"caller_nid": "checklists_gettemplate", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L48"}, {"caller_nid": "checklists_gettemplate", "callee": "from", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L48"}, {"caller_nid": "checklists_gettemplate", "callee": "select", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L48"}, {"caller_nid": "checklists_gettemplate", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L51"}, {"caller_nid": "checklists_gettemplate", "callee": "asc", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L52"}, {"caller_nid": "checklists_createtemplate", "callee": "returning", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L62"}, {"caller_nid": "checklists_createtemplate", "callee": "values", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L62"}, {"caller_nid": "checklists_createtemplate", "callee": "insert", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L62"}, {"caller_nid": "checklists_createtemplate", "callee": "trim", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L67"}, {"caller_nid": "checklists_updatetemplate", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L79"}, {"caller_nid": "checklists_updatetemplate", "callee": "set", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L79"}, {"caller_nid": "checklists_updatetemplate", "callee": "update", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L79"}, {"caller_nid": "checklists_updatetemplate", "callee": "trim", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L82"}, {"caller_nid": "checklists_updatetemplate", "callee": "and", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L85"}, {"caller_nid": "checklists_updatetemplate", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L85"}, {"caller_nid": "checklists_updatetemplate", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L85"}, {"caller_nid": "checklists_deletetemplate", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L89"}, {"caller_nid": "checklists_deletetemplate", "callee": "delete", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L89"}, {"caller_nid": "checklists_deletetemplate", "callee": "and", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L91"}, {"caller_nid": "checklists_deletetemplate", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L91"}, {"caller_nid": "checklists_deletetemplate", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L91"}, {"caller_nid": "checklists_addtemplateitem", "callee": "values", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L103"}, {"caller_nid": "checklists_addtemplateitem", "callee": "insert", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L103"}, {"caller_nid": "checklists_addtemplateitem", "callee": "trim", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L105"}, {"caller_nid": "checklists_removetemplateitem", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L118"}, {"caller_nid": "checklists_removetemplateitem", "callee": "delete", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L118"}, {"caller_nid": "checklists_removetemplateitem", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L118"}, {"caller_nid": "checklists_instantiatechecklist", "callee": "transaction", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L131"}, {"caller_nid": "checklists_getinstance", "callee": "limit", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L187"}, {"caller_nid": "checklists_getinstance", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L187"}, {"caller_nid": "checklists_getinstance", "callee": "from", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L187"}, {"caller_nid": "checklists_getinstance", "callee": "select", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L187"}, {"caller_nid": "checklists_getinstance", "callee": "and", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L190"}, {"caller_nid": "checklists_getinstance", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L190"}, {"caller_nid": "checklists_getinstance", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L190"}, {"caller_nid": "checklists_getinstance", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L193"}, {"caller_nid": "checklists_getinstance", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L193"}, {"caller_nid": "checklists_getinstance", "callee": "from", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L193"}, {"caller_nid": "checklists_getinstance", "callee": "select", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L193"}, {"caller_nid": "checklists_getinstance", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L196"}, {"caller_nid": "checklists_getinstance", "callee": "asc", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L197"}, {"caller_nid": "checklists_setitemdone", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L211"}, {"caller_nid": "checklists_setitemdone", "callee": "set", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L211"}, {"caller_nid": "checklists_setitemdone", "callee": "update", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L211"}, {"caller_nid": "checklists_setitemdone", "callee": "and", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L219"}, {"caller_nid": "checklists_setitemdone", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L219"}, {"caller_nid": "checklists_setitemdone", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L219"}, {"caller_nid": "checklists_completeinstance", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L226"}, {"caller_nid": "checklists_completeinstance", "callee": "set", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L226"}, {"caller_nid": "checklists_completeinstance", "callee": "update", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L226"}, {"caller_nid": "checklists_completeinstance", "callee": "sql", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L228"}, {"caller_nid": "checklists_completeinstance", "callee": "and", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L230"}, {"caller_nid": "checklists_completeinstance", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L231"}, {"caller_nid": "checklists_completeinstance", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L232"}, {"caller_nid": "checklists_completeinstance", "callee": "isNull", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L233"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L243"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "where", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L243"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "from", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L243"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "select", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L243"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "and", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L247"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L248"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L249"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L250"}, {"caller_nid": "checklists_listinstancesforscope", "callee": "desc", "source_file": "src\\lib\\server\\services\\checklists.ts", "source_location": "L253"}]} \ No newline at end of file diff --git a/graphify-out/cache/57fcbad98f7df0b472ee19cb751b6e06357e917266a2b0061f9ae97f87a85da0.json b/graphify-out/cache/57fcbad98f7df0b472ee19cb751b6e06357e917266a2b0061f9ae97f87a85da0.json new file mode 100644 index 0000000..7b2507b --- /dev/null +++ b/graphify-out/cache/57fcbad98f7df0b472ee19cb751b6e06357e917266a2b0061f9ae97f87a85da0.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_new_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_e2n", "label": "e2n()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", "source_location": "L15"}], "edges": [{"source": "src_routes_app_projects_new_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_new_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_new_page_server_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_new_page_server_ts", "target": "src_routes_app_projects_new_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_projects_new_page_server_ts", "target": "page_server_e2n", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", "source_location": "L15", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/58688fb0dbd92b8ae868e5edc902359f9941cb15af5cc420aa213752f028652d.json b/graphify-out/cache/58688fb0dbd92b8ae868e5edc902359f9941cb15af5cc420aa213752f028652d.json new file mode 100644 index 0000000..3bfbc77 --- /dev/null +++ b/graphify-out/cache/58688fb0dbd92b8ae868e5edc902359f9941cb15af5cc420aa213752f028652d.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_storage_types_ts", "label": "types.ts", "file_type": "code", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L1"}, {"id": "types_generatestoragekey", "label": "generateStorageKey()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L40"}], "edges": [{"source": "src_lib_server_storage_types_ts", "target": "node_stream", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_storage_types_ts", "target": "types_generatestoragekey", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L40", "weight": 1.0}], "raw_calls": [{"caller_nid": "types_generatestoragekey", "callee": "getUTCFullYear", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L42"}, {"caller_nid": "types_generatestoragekey", "callee": "padStart", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L43"}, {"caller_nid": "types_generatestoragekey", "callee": "String", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L43"}, {"caller_nid": "types_generatestoragekey", "callee": "getUTCMonth", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L43"}, {"caller_nid": "types_generatestoragekey", "callee": "randomUUID", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L44"}, {"caller_nid": "types_generatestoragekey", "callee": "slice", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L45"}, {"caller_nid": "types_generatestoragekey", "callee": "replace", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L45"}, {"caller_nid": "types_generatestoragekey", "callee": "replace", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L45"}, {"caller_nid": "types_generatestoragekey", "callee": "normalize", "source_file": "src\\lib\\server\\storage\\types.ts", "source_location": "L45"}]} \ No newline at end of file diff --git a/graphify-out/cache/5926ab6b2e061477144bc6688d92245ea4048381b81a0dad7629ec0e08992873.json b/graphify-out/cache/5926ab6b2e061477144bc6688d92245ea4048381b81a0dad7629ec0e08992873.json new file mode 100644 index 0000000..8d9b6f3 --- /dev/null +++ b/graphify-out/cache/5926ab6b2e061477144bc6688d92245ea4048381b81a0dad7629ec0e08992873.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_work_wpid_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/5af6e12afa720e7a48c87056dc960477ccc6f812c998c2bb5f1d294e434b57b2.json b/graphify-out/cache/5af6e12afa720e7a48c87056dc960477ccc6f812c998c2bb5f1d294e434b57b2.json new file mode 100644 index 0000000..e06d2e5 --- /dev/null +++ b/graphify-out/cache/5af6e12afa720e7a48c87056dc960477ccc6f812c998c2bb5f1d294e434b57b2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_components_tabnav_svelte", "label": "TabNav.svelte", "file_type": "code", "source_file": "src\\lib\\components\\TabNav.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/5c86ef97282357954dc486282843af446aae83195f5dcc1f0f88714272d74b47.json b/graphify-out/cache/5c86ef97282357954dc486282843af446aae83195f5dcc1f0f88714272d74b47.json new file mode 100644 index 0000000..3db99f0 --- /dev/null +++ b/graphify-out/cache/5c86ef97282357954dc486282843af446aae83195f5dcc1f0f88714272d74b47.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_notifications_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_notifications_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_notifications_page_server_ts", "target": "guards", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_notifications_page_server_ts", "target": "notifications", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_notifications_page_server_ts", "target": "src_routes_app_notifications_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_notifications_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "requireCompany", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "listForUser", "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", "source_location": "L8"}]} \ No newline at end of file diff --git a/graphify-out/cache/5f3c7ba3457ac355a9e281c3371e70a4e8085505ae2784aee678cf88a9051ce8.json b/graphify-out/cache/5f3c7ba3457ac355a9e281c3371e70a4e8085505ae2784aee678cf88a9051ce8.json new file mode 100644 index 0000000..b31efb0 --- /dev/null +++ b/graphify-out/cache/5f3c7ba3457ac355a9e281c3371e70a4e8085505ae2784aee678cf88a9051ce8.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_layout_server_ts", "label": "+layout.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L1"}, {"id": "layout_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_properties_id_layout_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_properties_id_layout_server_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_properties_id_layout_server_ts", "target": "src_routes_app_properties_id_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_properties_id_layout_server_ts", "target": "layout_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "layout_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L6"}, {"caller_nid": "layout_server_load", "callee": "getProperty", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L7"}, {"caller_nid": "layout_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", "source_location": "L8"}]} \ No newline at end of file diff --git a/graphify-out/cache/601da90eb61ef79e221be4f595aec09e6bc82f3a1477d954e6b1598665938c1c.json b/graphify-out/cache/601da90eb61ef79e221be4f595aec09e6bc82f3a1477d954e6b1598665938c1c.json new file mode 100644 index 0000000..ed2ff8a --- /dev/null +++ b/graphify-out/cache/601da90eb61ef79e221be4f595aec09e6bc82f3a1477d954e6b1598665938c1c.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_index_ts", "label": "index.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\index.ts", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/608e5e58ccb0e4bf1e3df3dbc337bd3178cedb74dd01c0affadc5129ea747dcf.json b/graphify-out/cache/608e5e58ccb0e4bf1e3df3dbc337bd3178cedb74dd01c0affadc5129ea747dcf.json new file mode 100644 index 0000000..763f0c0 --- /dev/null +++ b/graphify-out/cache/608e5e58ccb0e4bf1e3df3dbc337bd3178cedb74dd01c0affadc5129ea747dcf.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_assets_ts", "label": "assets.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\assets.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_assets_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\assets.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_assets_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\assets.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_assets_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\assets.ts", "source_location": "L13", "weight": 1.0}, {"source": "src_lib_server_db_schema_assets_ts", "target": "src_lib_server_db_schema_properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\assets.ts", "source_location": "L14", "weight": 1.0}, {"source": "src_lib_server_db_schema_assets_ts", "target": "src_lib_server_db_schema_projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\assets.ts", "source_location": "L15", "weight": 1.0}, {"source": "src_lib_server_db_schema_assets_ts", "target": "src_lib_server_db_schema_rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\assets.ts", "source_location": "L16", "weight": 1.0}, {"source": "src_lib_server_db_schema_assets_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\assets.ts", "source_location": "L17", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/62190fa7d6d401a6856dae1292addd3cbe155afb29511808eb6e4be2162a0522.json b/graphify-out/cache/62190fa7d6d401a6856dae1292addd3cbe155afb29511808eb6e4be2162a0522.json new file mode 100644 index 0000000..73c39da --- /dev/null +++ b/graphify-out/cache/62190fa7d6d401a6856dae1292addd3cbe155afb29511808eb6e4be2162a0522.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_components_customfieldsform_svelte", "label": "CustomFieldsForm.svelte", "file_type": "code", "source_file": "src\\lib\\components\\CustomFieldsForm.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/64953bffa73ba41ce6eb6120cf0f8b42970471bb38d1f6d5ae3d3724b0f59767.json b/graphify-out/cache/64953bffa73ba41ce6eb6120cf0f8b42970471bb38d1f6d5ae3d3724b0f59767.json new file mode 100644 index 0000000..9e006c3 --- /dev/null +++ b/graphify-out/cache/64953bffa73ba41ce6eb6120cf0f8b42970471bb38d1f6d5ae3d3724b0f59767.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/657a90bd6f8966aa8ffb6caaed9204c1e6054e2203b8e3fce43d417ab3f4d54a.json b/graphify-out/cache/657a90bd6f8966aa8ffb6caaed9204c1e6054e2203b8e3fce43d417ab3f4d54a.json new file mode 100644 index 0000000..c93ef2e --- /dev/null +++ b/graphify-out/cache/657a90bd6f8966aa8ffb6caaed9204c1e6054e2203b8e3fce43d417ab3f4d54a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_properties_ts", "label": "properties.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L1"}, {"id": "properties_createproperty", "label": "createProperty()", "file_type": "code", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L19"}, {"id": "properties_listproperties", "label": "listProperties()", "file_type": "code", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L37"}, {"id": "properties_getproperty", "label": "getProperty()", "file_type": "code", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L45"}, {"id": "properties_updateproperty", "label": "updateProperty()", "file_type": "code", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L60"}, {"id": "properties_softdeleteproperty", "label": "softDeleteProperty()", "file_type": "code", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L83"}], "edges": [{"source": "src_lib_server_services_properties_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_properties_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_properties_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_properties_ts", "target": "properties_createproperty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L19", "weight": 1.0}, {"source": "src_lib_server_services_properties_ts", "target": "properties_listproperties", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L37", "weight": 1.0}, {"source": "src_lib_server_services_properties_ts", "target": "properties_getproperty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L45", "weight": 1.0}, {"source": "src_lib_server_services_properties_ts", "target": "properties_updateproperty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L60", "weight": 1.0}, {"source": "src_lib_server_services_properties_ts", "target": "properties_softdeleteproperty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L83", "weight": 1.0}], "raw_calls": [{"caller_nid": "properties_createproperty", "callee": "trim", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L22"}, {"caller_nid": "properties_createproperty", "callee": "toUpperCase", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L29"}, {"caller_nid": "properties_createproperty", "callee": "returning", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L33"}, {"caller_nid": "properties_createproperty", "callee": "values", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L33"}, {"caller_nid": "properties_createproperty", "callee": "insert", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L33"}, {"caller_nid": "properties_listproperties", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L38"}, {"caller_nid": "properties_listproperties", "callee": "where", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L38"}, {"caller_nid": "properties_listproperties", "callee": "from", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L38"}, {"caller_nid": "properties_listproperties", "callee": "select", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L38"}, {"caller_nid": "properties_listproperties", "callee": "and", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L41"}, {"caller_nid": "properties_listproperties", "callee": "eq", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L41"}, {"caller_nid": "properties_listproperties", "callee": "isNull", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L41"}, {"caller_nid": "properties_listproperties", "callee": "desc", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L42"}, {"caller_nid": "properties_getproperty", "callee": "limit", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L46"}, {"caller_nid": "properties_getproperty", "callee": "where", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L46"}, {"caller_nid": "properties_getproperty", "callee": "from", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L46"}, {"caller_nid": "properties_getproperty", "callee": "select", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L46"}, {"caller_nid": "properties_getproperty", "callee": "and", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L50"}, {"caller_nid": "properties_getproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L51"}, {"caller_nid": "properties_getproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L52"}, {"caller_nid": "properties_getproperty", "callee": "isNull", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L53"}, {"caller_nid": "properties_updateproperty", "callee": "where", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L65"}, {"caller_nid": "properties_updateproperty", "callee": "set", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L65"}, {"caller_nid": "properties_updateproperty", "callee": "update", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L65"}, {"caller_nid": "properties_updateproperty", "callee": "trim", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L68"}, {"caller_nid": "properties_updateproperty", "callee": "toUpperCase", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L76"}, {"caller_nid": "properties_updateproperty", "callee": "and", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L80"}, {"caller_nid": "properties_updateproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L80"}, {"caller_nid": "properties_updateproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L80"}, {"caller_nid": "properties_softdeleteproperty", "callee": "where", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L84"}, {"caller_nid": "properties_softdeleteproperty", "callee": "set", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L84"}, {"caller_nid": "properties_softdeleteproperty", "callee": "update", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L84"}, {"caller_nid": "properties_softdeleteproperty", "callee": "sql", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L86"}, {"caller_nid": "properties_softdeleteproperty", "callee": "and", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L87"}, {"caller_nid": "properties_softdeleteproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L87"}, {"caller_nid": "properties_softdeleteproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\properties.ts", "source_location": "L87"}]} \ No newline at end of file diff --git a/graphify-out/cache/65a0cac8c2825de1649dad6b831baafe23e5de989366bdc59ae209923a013fde.json b/graphify-out/cache/65a0cac8c2825de1649dad6b831baafe23e5de989366bdc59ae209923a013fde.json new file mode 100644 index 0000000..98b9b50 --- /dev/null +++ b/graphify-out/cache/65a0cac8c2825de1649dad6b831baafe23e5de989366bdc59ae209923a013fde.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_wiki_ts", "label": "wiki.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\wiki.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_wiki_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\wiki.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_wiki_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\wiki.ts", "source_location": "L10", "weight": 1.0}, {"source": "src_lib_server_db_schema_wiki_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\wiki.ts", "source_location": "L11", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/669fc2fdcb351eae37c0019c28cb61ec5d6d63bb156918c20db2c33027679094.json b/graphify-out/cache/669fc2fdcb351eae37c0019c28cb61ec5d6d63bb156918c20db2c33027679094.json new file mode 100644 index 0000000..d412edd --- /dev/null +++ b/graphify-out/cache/669fc2fdcb351eae37c0019c28cb61ec5d6d63bb156918c20db2c33027679094.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_slug_edit_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_wiki_slug_edit_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_edit_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_edit_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_edit_page_server_ts", "target": "src_routes_app_wiki_slug_edit_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_edit_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "getPageWithCurrentRevision", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L9"}]} \ No newline at end of file diff --git a/graphify-out/cache/66a2a898047442c701d9b2ff6af4e7067f5933bfad8c88410e0b12ae0871f39c.json b/graphify-out/cache/66a2a898047442c701d9b2ff6af4e7067f5933bfad8c88410e0b12ae0871f39c.json new file mode 100644 index 0000000..044db57 --- /dev/null +++ b/graphify-out/cache/66a2a898047442c701d9b2ff6af4e7067f5933bfad8c88410e0b12ae0871f39c.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_api_qr_server_ts", "label": "+server.ts", "file_type": "code", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L1"}, {"id": "server_get", "label": "GET()", "file_type": "code", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L10"}, {"id": "server_clamp", "label": "clamp()", "file_type": "code", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L42"}], "edges": [{"source": "src_routes_api_qr_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_api_qr_server_ts", "target": "qrcode", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_api_qr_server_ts", "target": "src_routes_api_qr_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_api_qr_server_ts", "target": "server_get", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L10", "weight": 1.0}, {"source": "src_routes_api_qr_server_ts", "target": "server_clamp", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L42", "weight": 1.0}, {"source": "server_get", "target": "server_clamp", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L17", "weight": 1.0}], "raw_calls": [{"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L11"}, {"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L14"}, {"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L15"}, {"caller_nid": "server_get", "callee": "parseInt", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L17"}, {"caller_nid": "server_get", "callee": "parseInt", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L18"}, {"caller_nid": "server_get", "callee": "toString", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L22"}, {"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L30"}, {"caller_nid": "server_clamp", "callee": "max", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L43"}, {"caller_nid": "server_clamp", "callee": "min", "source_file": "src\\routes\\api\\qr\\+server.ts", "source_location": "L43"}]} \ No newline at end of file diff --git a/graphify-out/cache/6780761f6d9f7d6adbfa51d4f29965f2615fcde65958e1e0e89f420657539c3a.json b/graphify-out/cache/6780761f6d9f7d6adbfa51d4f29965f2615fcde65958e1e0e89f420657539c3a.json new file mode 100644 index 0000000..42bf5d9 --- /dev/null +++ b/graphify-out/cache/6780761f6d9f7d6adbfa51d4f29965f2615fcde65958e1e0e89f420657539c3a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_switch_company_server_ts", "label": "+server.ts", "file_type": "code", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L1"}, {"id": "server_post", "label": "POST()", "file_type": "code", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L8"}], "edges": [{"source": "src_routes_switch_company_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_switch_company_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_switch_company_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_switch_company_server_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_switch_company_server_ts", "target": "session", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_switch_company_server_ts", "target": "src_routes_switch_company_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_switch_company_server_ts", "target": "server_post", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L8", "weight": 1.0}], "raw_calls": [{"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L9"}, {"caller_nid": "server_post", "callee": "formData", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L11"}, {"caller_nid": "server_post", "callee": "String", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L12"}, {"caller_nid": "server_post", "callee": "get", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L12"}, {"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L13"}, {"caller_nid": "server_post", "callee": "limit", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L16"}, {"caller_nid": "server_post", "callee": "where", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L16"}, {"caller_nid": "server_post", "callee": "from", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L16"}, {"caller_nid": "server_post", "callee": "select", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L16"}, {"caller_nid": "server_post", "callee": "and", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L19"}, {"caller_nid": "server_post", "callee": "eq", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L19"}, {"caller_nid": "server_post", "callee": "eq", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L19"}, {"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L21"}, {"caller_nid": "server_post", "callee": "setActiveCompany", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L23"}, {"caller_nid": "server_post", "callee": "String", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L25"}, {"caller_nid": "server_post", "callee": "get", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L25"}, {"caller_nid": "server_post", "callee": "get", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L25"}, {"caller_nid": "server_post", "callee": "redirect", "source_file": "src\\routes\\switch-company\\+server.ts", "source_location": "L26"}]} \ No newline at end of file diff --git a/graphify-out/cache/692c0322875cafdd4d0f9eea1701eca0de91dffaa549817346d1696342e802ad.json b/graphify-out/cache/692c0322875cafdd4d0f9eea1701eca0de91dffaa549817346d1696342e802ad.json new file mode 100644 index 0000000..25b9848 --- /dev/null +++ b/graphify-out/cache/692c0322875cafdd4d0f9eea1701eca0de91dffaa549817346d1696342e802ad.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_notifications_ts", "label": "notifications.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\notifications.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_notifications_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\notifications.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_notifications_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\notifications.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_notifications_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\notifications.ts", "source_location": "L3", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/69a870ab9e40447c4023d210218a35e2ddb9a147b49b7b3879345083037726e7.json b/graphify-out/cache/69a870ab9e40447c4023d210218a35e2ddb9a147b49b7b3879345083037726e7.json new file mode 100644 index 0000000..3eafd93 --- /dev/null +++ b/graphify-out/cache/69a870ab9e40447c4023d210218a35e2ddb9a147b49b7b3879345083037726e7.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_checklists_ts", "label": "checklists.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\checklists.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_checklists_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\checklists.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_checklists_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\checklists.ts", "source_location": "L12", "weight": 1.0}, {"source": "src_lib_server_db_schema_checklists_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\checklists.ts", "source_location": "L13", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/6aab072fef67b0a97f3f09f0cdfe40e85de761ceb43f5b5f434257f5b3c02621.json b/graphify-out/cache/6aab072fef67b0a97f3f09f0cdfe40e85de761ceb43f5b5f434257f5b3c02621.json new file mode 100644 index 0000000..ef3034f --- /dev/null +++ b/graphify-out/cache/6aab072fef67b0a97f3f09f0cdfe40e85de761ceb43f5b5f434257f5b3c02621.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", "target": "markdown", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", "target": "src_routes_app_wiki_slug_revisions_rev_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "getPageWithCurrentRevision", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "parseInt", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L10"}, {"caller_nid": "page_server_load", "callee": "isFinite", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "getRevision", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "renderMarkdown", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L19"}]} \ No newline at end of file diff --git a/graphify-out/cache/6bb6a19f0ac87c5083221f028855346caa09958ad4027f36d0258f84e4886401.json b/graphify-out/cache/6bb6a19f0ac87c5083221f028855346caa09958ad4027f36d0258f84e4886401.json new file mode 100644 index 0000000..a78e4c2 --- /dev/null +++ b/graphify-out/cache/6bb6a19f0ac87c5083221f028855346caa09958ad4027f36d0258f84e4886401.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_new_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.server.ts", "source_location": "L1"}], "edges": [{"source": "src_routes_app_projects_id_wiki_new_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_new_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_new_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_new_page_server_ts", "target": "src_routes_app_projects_id_wiki_new_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.server.ts", "source_location": "L4", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/6c74b83cec21c8d5573a5bdcaf83f82e12e50090f8e88c45f39cf6f95a316481.json b/graphify-out/cache/6c74b83cec21c8d5573a5bdcaf83f82e12e50090f8e88c45f39cf6f95a316481.json new file mode 100644 index 0000000..20aaab9 --- /dev/null +++ b/graphify-out/cache/6c74b83cec21c8d5573a5bdcaf83f82e12e50090f8e88c45f39cf6f95a316481.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_documents_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L12"}], "edges": [{"source": "src_routes_app_assets_id_documents_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_documents_page_server_ts", "target": "documents", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_documents_page_server_ts", "target": "src_routes_app_assets_id_documents_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_assets_id_documents_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L12", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "listDocumentsForScope", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L14"}, {"caller_nid": "page_server_load", "callee": "all", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "map", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", "source_location": "L16"}]} \ No newline at end of file diff --git a/graphify-out/cache/6ccf3edbb0bb86c4d7ebb6fd4e799c2e5050b5d9a87890368d205e2672e64b57.json b/graphify-out/cache/6ccf3edbb0bb86c4d7ebb6fd4e799c2e5050b5d9a87890368d205e2672e64b57.json new file mode 100644 index 0000000..531fa89 --- /dev/null +++ b/graphify-out/cache/6ccf3edbb0bb86c4d7ebb6fd4e799c2e5050b5d9a87890368d205e2672e64b57.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", "target": "src_routes_app_projects_id_wiki_slug_edit_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "getPageWithCurrentRevision", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", "source_location": "L9"}]} \ No newline at end of file diff --git a/graphify-out/cache/6f136b02257ffffbe87c430a4845794097dab0de7e0b04befc957eb382fe6f66.json b/graphify-out/cache/6f136b02257ffffbe87c430a4845794097dab0de7e0b04befc957eb382fe6f66.json new file mode 100644 index 0000000..5660e06 --- /dev/null +++ b/graphify-out/cache/6f136b02257ffffbe87c430a4845794097dab0de7e0b04befc957eb382fe6f66.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_auth_login_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(auth)\\login\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/71b287edcc8ae4ca1ba6ada5f029ac3a38f8f7c6369237e701b81f10cbe925df.json b/graphify-out/cache/71b287edcc8ae4ca1ba6ada5f029ac3a38f8f7c6369237e701b81f10cbe925df.json new file mode 100644 index 0000000..4b641fa --- /dev/null +++ b/graphify-out/cache/71b287edcc8ae4ca1ba6ada5f029ac3a38f8f7c6369237e701b81f10cbe925df.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_field_types_ts", "label": "field-types.ts", "file_type": "code", "source_file": "src\\lib\\field-types.ts", "source_location": "L1"}, {"id": "field_types_needsenumvalues", "label": "needsEnumValues()", "file_type": "code", "source_file": "src\\lib\\field-types.ts", "source_location": "L54"}], "edges": [{"source": "src_lib_field_types_ts", "target": "field_types_needsenumvalues", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\field-types.ts", "source_location": "L54", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/720e72972455399015a8fdd1adc67c53c496be226ea79dc7c4d4e19f74eb8f04.json b/graphify-out/cache/720e72972455399015a8fdd1adc67c53c496be226ea79dc7c4d4e19f74eb8f04.json new file mode 100644 index 0000000..f831d58 --- /dev/null +++ b/graphify-out/cache/720e72972455399015a8fdd1adc67c53c496be226ea79dc7c4d4e19f74eb8f04.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_work_packages_ts", "label": "work-packages.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L1"}, {"id": "work_packages_assertproject", "label": "assertProject()", "file_type": "code", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L5"}, {"id": "work_packages_listworkpackagesforproject", "label": "listWorkPackagesForProject()", "file_type": "code", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L20"}, {"id": "work_packages_createworkpackage", "label": "createWorkPackage()", "file_type": "code", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L47"}, {"id": "work_packages_getworkpackage", "label": "getWorkPackage()", "file_type": "code", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L72"}, {"id": "work_packages_updateworkpackage", "label": "updateWorkPackage()", "file_type": "code", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L88"}, {"id": "work_packages_softdeleteworkpackage", "label": "softDeleteWorkPackage()", "file_type": "code", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L104"}], "edges": [{"source": "src_lib_server_services_work_packages_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_work_packages_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_work_packages_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_work_packages_ts", "target": "work_packages_assertproject", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_services_work_packages_ts", "target": "work_packages_listworkpackagesforproject", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L20", "weight": 1.0}, {"source": "src_lib_server_services_work_packages_ts", "target": "work_packages_createworkpackage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L47", "weight": 1.0}, {"source": "src_lib_server_services_work_packages_ts", "target": "work_packages_getworkpackage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L72", "weight": 1.0}, {"source": "src_lib_server_services_work_packages_ts", "target": "work_packages_updateworkpackage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L88", "weight": 1.0}, {"source": "src_lib_server_services_work_packages_ts", "target": "work_packages_softdeleteworkpackage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L104", "weight": 1.0}, {"source": "work_packages_listworkpackagesforproject", "target": "work_packages_assertproject", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L21", "weight": 1.0}, {"source": "work_packages_createworkpackage", "target": "work_packages_assertproject", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L53", "weight": 1.0}, {"source": "work_packages_updateworkpackage", "target": "work_packages_getworkpackage", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L93", "weight": 1.0}, {"source": "work_packages_softdeleteworkpackage", "target": "work_packages_getworkpackage", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L105", "weight": 1.0}], "raw_calls": [{"caller_nid": "work_packages_assertproject", "callee": "limit", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L6"}, {"caller_nid": "work_packages_assertproject", "callee": "where", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L6"}, {"caller_nid": "work_packages_assertproject", "callee": "from", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L6"}, {"caller_nid": "work_packages_assertproject", "callee": "select", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L6"}, {"caller_nid": "work_packages_assertproject", "callee": "and", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L10"}, {"caller_nid": "work_packages_assertproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L11"}, {"caller_nid": "work_packages_assertproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L12"}, {"caller_nid": "work_packages_assertproject", "callee": "isNull", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L13"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L22"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "where", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L22"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "from", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L22"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "select", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L22"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "and", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L43"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L43"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "isNull", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L43"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "asc", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L44"}, {"caller_nid": "work_packages_listworkpackagesforproject", "callee": "asc", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L44"}, {"caller_nid": "work_packages_createworkpackage", "callee": "where", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L54"}, {"caller_nid": "work_packages_createworkpackage", "callee": "from", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L54"}, {"caller_nid": "work_packages_createworkpackage", "callee": "select", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L54"}, {"caller_nid": "work_packages_createworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L59"}, {"caller_nid": "work_packages_createworkpackage", "callee": "returning", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L60"}, {"caller_nid": "work_packages_createworkpackage", "callee": "values", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L60"}, {"caller_nid": "work_packages_createworkpackage", "callee": "insert", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L60"}, {"caller_nid": "work_packages_createworkpackage", "callee": "trim", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L64"}, {"caller_nid": "work_packages_getworkpackage", "callee": "limit", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L73"}, {"caller_nid": "work_packages_getworkpackage", "callee": "where", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L73"}, {"caller_nid": "work_packages_getworkpackage", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L73"}, {"caller_nid": "work_packages_getworkpackage", "callee": "from", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L73"}, {"caller_nid": "work_packages_getworkpackage", "callee": "select", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L73"}, {"caller_nid": "work_packages_getworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L76"}, {"caller_nid": "work_packages_getworkpackage", "callee": "and", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L78"}, {"caller_nid": "work_packages_getworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L79"}, {"caller_nid": "work_packages_getworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L80"}, {"caller_nid": "work_packages_getworkpackage", "callee": "isNull", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L81"}, {"caller_nid": "work_packages_updateworkpackage", "callee": "where", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L95"}, {"caller_nid": "work_packages_updateworkpackage", "callee": "set", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L95"}, {"caller_nid": "work_packages_updateworkpackage", "callee": "update", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L95"}, {"caller_nid": "work_packages_updateworkpackage", "callee": "trim", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L98"}, {"caller_nid": "work_packages_updateworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L101"}, {"caller_nid": "work_packages_softdeleteworkpackage", "callee": "where", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L107"}, {"caller_nid": "work_packages_softdeleteworkpackage", "callee": "set", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L107"}, {"caller_nid": "work_packages_softdeleteworkpackage", "callee": "update", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L107"}, {"caller_nid": "work_packages_softdeleteworkpackage", "callee": "sql", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L109"}, {"caller_nid": "work_packages_softdeleteworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\work-packages.ts", "source_location": "L110"}]} \ No newline at end of file diff --git a/graphify-out/cache/727cf4f2fee56a608e2588c3f0e3b606d7631eeab336657a18174fd9a9517586.json b/graphify-out/cache/727cf4f2fee56a608e2588c3f0e3b606d7631eeab336657a18174fd9a9517586.json new file mode 100644 index 0000000..fe1f7a6 --- /dev/null +++ b/graphify-out/cache/727cf4f2fee56a608e2588c3f0e3b606d7631eeab336657a18174fd9a9517586.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_rooms_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L15"}], "edges": [{"source": "src_routes_app_properties_id_rooms_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_properties_id_rooms_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_properties_id_rooms_page_server_ts", "target": "rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_properties_id_rooms_page_server_ts", "target": "src_routes_app_properties_id_rooms_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L13", "weight": 1.0}, {"source": "src_routes_app_properties_id_rooms_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L15", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L16"}, {"caller_nid": "page_server_load", "callee": "all", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "listFloors", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L18"}, {"caller_nid": "page_server_load", "callee": "listRoomsWithCounts", "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", "source_location": "L19"}]} \ No newline at end of file diff --git a/graphify-out/cache/733b8c1a6890aed0c125a1ac5da5c9f0d63a8a1bd6cfb9115ec1df71ea2c8daa.json b/graphify-out/cache/733b8c1a6890aed0c125a1ac5da5c9f0d63a8a1bd6cfb9115ec1df71ea2c8daa.json new file mode 100644 index 0000000..4862f6a --- /dev/null +++ b/graphify-out/cache/733b8c1a6890aed0c125a1ac5da5c9f0d63a8a1bd6cfb9115ec1df71ea2c8daa.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_layout_server_ts", "label": "+layout.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L1"}, {"id": "layout_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L10"}], "edges": [{"source": "src_routes_app_layout_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_layout_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_layout_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_layout_server_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_layout_server_ts", "target": "session", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_layout_server_ts", "target": "notifications", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_layout_server_ts", "target": "src_routes_app_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_layout_server_ts", "target": "types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_layout_server_ts", "target": "layout_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L10", "weight": 1.0}], "raw_calls": [{"caller_nid": "layout_server_load", "callee": "redirect", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L13"}, {"caller_nid": "layout_server_load", "callee": "encodeURIComponent", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L13"}, {"caller_nid": "layout_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L16"}, {"caller_nid": "layout_server_load", "callee": "innerJoin", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L16"}, {"caller_nid": "layout_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L16"}, {"caller_nid": "layout_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L16"}, {"caller_nid": "layout_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L24"}, {"caller_nid": "layout_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L25"}, {"caller_nid": "layout_server_load", "callee": "map", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L27"}, {"caller_nid": "layout_server_load", "callee": "setActiveCompany", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L39"}, {"caller_nid": "layout_server_load", "callee": "unreadCountForUser", "source_file": "src\\routes\\(app)\\+layout.server.ts", "source_location": "L44"}]} \ No newline at end of file diff --git a/graphify-out/cache/734948dbb4593f19d2dd2825e0991594ed966c8f36a0964cdd548772d65e44c8.json b/graphify-out/cache/734948dbb4593f19d2dd2825e0991594ed966c8f36a0964cdd548772d65e44c8.json new file mode 100644 index 0000000..ab33152 --- /dev/null +++ b/graphify-out/cache/734948dbb4593f19d2dd2825e0991594ed966c8f36a0964cdd548772d65e44c8.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_notifications_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\notifications\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/76f26d396f893e2d5e986888cc0c61d26bbb99b031f242affa983025008996c4.json b/graphify-out/cache/76f26d396f893e2d5e986888cc0c61d26bbb99b031f242affa983025008996c4.json new file mode 100644 index 0000000..c644e08 --- /dev/null +++ b/graphify-out/cache/76f26d396f893e2d5e986888cc0c61d26bbb99b031f242affa983025008996c4.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/77cc1f8a2164a60497d4def4250e2dd7bb413838ea8e695fe1224dfe6991c515.json b/graphify-out/cache/77cc1f8a2164a60497d4def4250e2dd7bb413838ea8e695fe1224dfe6991c515.json new file mode 100644 index 0000000..981d850 --- /dev/null +++ b/graphify-out/cache/77cc1f8a2164a60497d4def4250e2dd7bb413838ea8e695fe1224dfe6991c515.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_new_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\new\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/7803a04e66abe4e8ccd1deb0d0536bb62c7819cb6d9c9f985cdff31c8a6257b2.json b/graphify-out/cache/7803a04e66abe4e8ccd1deb0d0536bb62c7819cb6d9c9f985cdff31c8a6257b2.json new file mode 100644 index 0000000..20c3fda --- /dev/null +++ b/graphify-out/cache/7803a04e66abe4e8ccd1deb0d0536bb62c7819cb6d9c9f985cdff31c8a6257b2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_projects_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_page_server_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_page_server_ts", "target": "src_routes_app_projects_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "listProjects", "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", "source_location": "L7"}]} \ No newline at end of file diff --git a/graphify-out/cache/7a3304c1cfe5b5376911161c463298c6eb16046d38e9ae6dc9143286ce4271f4.json b/graphify-out/cache/7a3304c1cfe5b5376911161c463298c6eb16046d38e9ae6dc9143286ce4271f4.json new file mode 100644 index 0000000..c11f034 --- /dev/null +++ b/graphify-out/cache/7a3304c1cfe5b5376911161c463298c6eb16046d38e9ae6dc9143286ce4271f4.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_app_d_ts", "label": "app.d.ts", "file_type": "code", "source_file": "src\\app.d.ts", "source_location": "L1"}], "edges": [{"source": "src_app_d_ts", "target": "types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\app.d.ts", "source_location": "L1", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/7ac2ead665253cae4b5996fda1269ec5a9fba3421341e9e028366faeb462af93.json b/graphify-out/cache/7ac2ead665253cae4b5996fda1269ec5a9fba3421341e9e028366faeb462af93.json new file mode 100644 index 0000000..fe326cc --- /dev/null +++ b/graphify-out/cache/7ac2ead665253cae4b5996fda1269ec5a9fba3421341e9e028366faeb462af93.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_notifications_email_ts", "label": "email.ts", "file_type": "code", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L1"}, {"id": "email_isemailconfigured", "label": "isEmailConfigured()", "file_type": "code", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L6"}, {"id": "email_gettransport", "label": "getTransport()", "file_type": "code", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L10"}, {"id": "email_sendemail", "label": "sendEmail()", "file_type": "code", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L35"}], "edges": [{"source": "src_lib_server_notifications_email_ts", "target": "nodemailer", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_notifications_email_ts", "target": "env", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_notifications_email_ts", "target": "email_isemailconfigured", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_lib_server_notifications_email_ts", "target": "email_gettransport", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L10", "weight": 1.0}, {"source": "src_lib_server_notifications_email_ts", "target": "email_sendemail", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L35", "weight": 1.0}, {"source": "email_gettransport", "target": "email_isemailconfigured", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L12", "weight": 1.0}, {"source": "email_sendemail", "target": "email_isemailconfigured", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L36", "weight": 1.0}, {"source": "email_sendemail", "target": "email_gettransport", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L38", "weight": 1.0}], "raw_calls": [{"caller_nid": "email_isemailconfigured", "callee": "Boolean", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L7"}, {"caller_nid": "email_gettransport", "callee": "createTransport", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L15"}, {"caller_nid": "email_gettransport", "callee": "parseInt", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L17"}, {"caller_nid": "email_sendemail", "callee": "sendMail", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L38"}, {"caller_nid": "email_sendemail", "callee": "warn", "source_file": "src\\lib\\server\\notifications\\email.ts", "source_location": "L46"}]} \ No newline at end of file diff --git a/graphify-out/cache/7ae3dc59e64279edf785f3dc83e2654f939deb82f17b24b3cf88154369c43410.json b/graphify-out/cache/7ae3dc59e64279edf785f3dc83e2654f939deb82f17b24b3cf88154369c43410.json new file mode 100644 index 0000000..527375d --- /dev/null +++ b/graphify-out/cache/7ae3dc59e64279edf785f3dc83e2654f939deb82f17b24b3cf88154369c43410.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_maintenance_ts", "label": "maintenance.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L1"}, {"id": "maintenance_addinterval", "label": "addInterval()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L19"}, {"id": "maintenance_assertasset", "label": "assertAsset()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L34"}, {"id": "maintenance_createschedule", "label": "createSchedule()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L59"}, {"id": "maintenance_listschedulesforasset", "label": "listSchedulesForAsset()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L99"}, {"id": "maintenance_getschedule", "label": "getSchedule()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L108"}, {"id": "maintenance_setscheduleactive", "label": "setScheduleActive()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L121"}, {"id": "maintenance_deleteschedule", "label": "deleteSchedule()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L134"}, {"id": "maintenance_recordusagereading", "label": "recordUsageReading()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L142"}, {"id": "maintenance_latestusagereading", "label": "latestUsageReading()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L167"}, {"id": "maintenance_recordmaintenanceevent", "label": "recordMaintenanceEvent()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L201"}, {"id": "maintenance_listeventsforasset", "label": "listEventsForAsset()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L285"}, {"id": "maintenance_listusagereadingsforasset", "label": "listUsageReadingsForAsset()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L305"}, {"id": "maintenance_listdueandoverdue", "label": "listDueAndOverdue()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L323"}, {"id": "maintenance_countoverdueforcompany", "label": "countOverdueForCompany()", "file_type": "code", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L352"}], "edges": [{"source": "src_lib_server_services_maintenance_ts", "target": "date_fns", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "src_lib_server_services_checklists", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L11", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_addinterval", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L19", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_assertasset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L34", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_createschedule", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L59", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_listschedulesforasset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L99", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_getschedule", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L108", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_setscheduleactive", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L121", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_deleteschedule", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L134", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_recordusagereading", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L142", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_latestusagereading", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L167", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_recordmaintenanceevent", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L201", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_listeventsforasset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L285", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_listusagereadingsforasset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L305", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_listdueandoverdue", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L323", "weight": 1.0}, {"source": "src_lib_server_services_maintenance_ts", "target": "maintenance_countoverdueforcompany", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L352", "weight": 1.0}, {"source": "maintenance_createschedule", "target": "maintenance_assertasset", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L60", "weight": 1.0}, {"source": "maintenance_createschedule", "target": "maintenance_addinterval", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L86", "weight": 1.0}, {"source": "maintenance_listschedulesforasset", "target": "maintenance_assertasset", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L100", "weight": 1.0}, {"source": "maintenance_setscheduleactive", "target": "maintenance_getschedule", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L126", "weight": 1.0}, {"source": "maintenance_deleteschedule", "target": "maintenance_getschedule", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L135", "weight": 1.0}, {"source": "maintenance_recordusagereading", "target": "maintenance_assertasset", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L150", "weight": 1.0}, {"source": "maintenance_recordmaintenanceevent", "target": "maintenance_getschedule", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L205", "weight": 1.0}, {"source": "maintenance_listeventsforasset", "target": "maintenance_assertasset", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L286", "weight": 1.0}, {"source": "maintenance_listusagereadingsforasset", "target": "maintenance_assertasset", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L306", "weight": 1.0}], "raw_calls": [{"caller_nid": "maintenance_addinterval", "callee": "addDays", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L22"}, {"caller_nid": "maintenance_addinterval", "callee": "addMonths", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L24"}, {"caller_nid": "maintenance_addinterval", "callee": "addYears", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L26"}, {"caller_nid": "maintenance_addinterval", "callee": "addHours", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L28"}, {"caller_nid": "maintenance_assertasset", "callee": "limit", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L35"}, {"caller_nid": "maintenance_assertasset", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L35"}, {"caller_nid": "maintenance_assertasset", "callee": "from", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L35"}, {"caller_nid": "maintenance_assertasset", "callee": "select", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L35"}, {"caller_nid": "maintenance_assertasset", "callee": "and", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L38"}, {"caller_nid": "maintenance_assertasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L38"}, {"caller_nid": "maintenance_assertasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L38"}, {"caller_nid": "maintenance_createschedule", "callee": "has", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L62"}, {"caller_nid": "maintenance_createschedule", "callee": "has", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L65"}, {"caller_nid": "maintenance_createschedule", "callee": "trim", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L71"}, {"caller_nid": "maintenance_createschedule", "callee": "String", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L89"}, {"caller_nid": "maintenance_createschedule", "callee": "returning", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L92"}, {"caller_nid": "maintenance_createschedule", "callee": "values", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L92"}, {"caller_nid": "maintenance_createschedule", "callee": "insert", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L92"}, {"caller_nid": "maintenance_listschedulesforasset", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L101"}, {"caller_nid": "maintenance_listschedulesforasset", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L101"}, {"caller_nid": "maintenance_listschedulesforasset", "callee": "from", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L101"}, {"caller_nid": "maintenance_listschedulesforasset", "callee": "select", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L101"}, {"caller_nid": "maintenance_listschedulesforasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L104"}, {"caller_nid": "maintenance_listschedulesforasset", "callee": "desc", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L105"}, {"caller_nid": "maintenance_listschedulesforasset", "callee": "asc", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L105"}, {"caller_nid": "maintenance_getschedule", "callee": "limit", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L109"}, {"caller_nid": "maintenance_getschedule", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L109"}, {"caller_nid": "maintenance_getschedule", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L109"}, {"caller_nid": "maintenance_getschedule", "callee": "from", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L109"}, {"caller_nid": "maintenance_getschedule", "callee": "select", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L109"}, {"caller_nid": "maintenance_getschedule", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L115"}, {"caller_nid": "maintenance_getschedule", "callee": "and", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L116"}, {"caller_nid": "maintenance_getschedule", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L116"}, {"caller_nid": "maintenance_getschedule", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L116"}, {"caller_nid": "maintenance_setscheduleactive", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L128"}, {"caller_nid": "maintenance_setscheduleactive", "callee": "set", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L128"}, {"caller_nid": "maintenance_setscheduleactive", "callee": "update", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L128"}, {"caller_nid": "maintenance_setscheduleactive", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L131"}, {"caller_nid": "maintenance_deleteschedule", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L137"}, {"caller_nid": "maintenance_deleteschedule", "callee": "delete", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L137"}, {"caller_nid": "maintenance_deleteschedule", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L137"}, {"caller_nid": "maintenance_recordusagereading", "callee": "has", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L151"}, {"caller_nid": "maintenance_recordusagereading", "callee": "returning", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L154"}, {"caller_nid": "maintenance_recordusagereading", "callee": "values", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L154"}, {"caller_nid": "maintenance_recordusagereading", "callee": "insert", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L154"}, {"caller_nid": "maintenance_recordusagereading", "callee": "String", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L158"}, {"caller_nid": "maintenance_latestusagereading", "callee": "limit", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L171"}, {"caller_nid": "maintenance_latestusagereading", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L171"}, {"caller_nid": "maintenance_latestusagereading", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L171"}, {"caller_nid": "maintenance_latestusagereading", "callee": "from", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L171"}, {"caller_nid": "maintenance_latestusagereading", "callee": "select", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L171"}, {"caller_nid": "maintenance_latestusagereading", "callee": "and", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L174"}, {"caller_nid": "maintenance_latestusagereading", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L174"}, {"caller_nid": "maintenance_latestusagereading", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L174"}, {"caller_nid": "maintenance_latestusagereading", "callee": "desc", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L175"}, {"caller_nid": "maintenance_latestusagereading", "callee": "Number", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L178"}, {"caller_nid": "maintenance_latestusagereading", "callee": "isFinite", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L179"}, {"caller_nid": "maintenance_recordmaintenanceevent", "callee": "transaction", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L219"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "limit", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L287"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L287"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L287"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "leftJoin", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L287"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "from", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L287"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "select", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L287"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L299"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L300"}, {"caller_nid": "maintenance_listeventsforasset", "callee": "desc", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L301"}, {"caller_nid": "maintenance_listusagereadingsforasset", "callee": "limit", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L307"}, {"caller_nid": "maintenance_listusagereadingsforasset", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L307"}, {"caller_nid": "maintenance_listusagereadingsforasset", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L307"}, {"caller_nid": "maintenance_listusagereadingsforasset", "callee": "from", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L307"}, {"caller_nid": "maintenance_listusagereadingsforasset", "callee": "select", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L307"}, {"caller_nid": "maintenance_listusagereadingsforasset", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L310"}, {"caller_nid": "maintenance_listusagereadingsforasset", "callee": "desc", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L311"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "now", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L325"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "limit", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L327"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L327"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L327"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L327"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "from", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L327"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "select", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L327"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L338"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "and", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L340"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L341"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L342"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L343"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "isNotNull", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L344"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "lte", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L345"}, {"caller_nid": "maintenance_listdueandoverdue", "callee": "asc", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L348"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "where", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L353"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L353"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "from", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L353"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "select", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L353"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L356"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "and", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L358"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L359"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L360"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L361"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "isNotNull", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L362"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "lte", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L363"}, {"caller_nid": "maintenance_countoverdueforcompany", "callee": "sql", "source_file": "src\\lib\\server\\services\\maintenance.ts", "source_location": "L363"}]} \ No newline at end of file diff --git a/graphify-out/cache/7c35a7f17a8ae002dfac4f51765a35d88d85c48d421aa00f32c4d30e16e103cf.json b/graphify-out/cache/7c35a7f17a8ae002dfac4f51765a35d88d85c48d421aa00f32c4d30e16e103cf.json new file mode 100644 index 0000000..bfbc70c --- /dev/null +++ b/graphify-out/cache/7c35a7f17a8ae002dfac4f51765a35d88d85c48d421aa00f32c4d30e16e103cf.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L10"}], "edges": [{"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "maintenance", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "checklists", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "src_routes_app_assets_id_maintenance_events_eventid_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L10", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "limit", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "innerJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L19"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L20"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L21"}, {"caller_nid": "page_server_load", "callee": "and", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L23"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L25"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L26"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L30"}, {"caller_nid": "page_server_load", "callee": "getInstance", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", "source_location": "L34"}]} \ No newline at end of file diff --git a/graphify-out/cache/80012f375a1142733f00ffbcafce7d359ca50428119e8a3c8149d27746652934.json b/graphify-out/cache/80012f375a1142733f00ffbcafce7d359ca50428119e8a3c8149d27746652934.json new file mode 100644 index 0000000..8c0eeae --- /dev/null +++ b/graphify-out/cache/80012f375a1142733f00ffbcafce7d359ca50428119e8a3c8149d27746652934.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_layout_svelte", "label": "+layout.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\+layout.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/805bfef80467b0c4eb0a0a04923bf585707e255366b8ef487ff0b67b39476429.json b/graphify-out/cache/805bfef80467b0c4eb0a0a04923bf585707e255366b8ef487ff0b67b39476429.json new file mode 100644 index 0000000..7518c01 --- /dev/null +++ b/graphify-out/cache/805bfef80467b0c4eb0a0a04923bf585707e255366b8ef487ff0b67b39476429.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_projects_ts", "label": "projects.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L1"}, {"id": "projects_createproject", "label": "createProject()", "file_type": "code", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L16"}, {"id": "projects_listprojects", "label": "listProjects()", "file_type": "code", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L31"}, {"id": "projects_getproject", "label": "getProject()", "file_type": "code", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L39"}, {"id": "projects_updateproject", "label": "updateProject()", "file_type": "code", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L50"}, {"id": "projects_softdeleteproject", "label": "softDeleteProject()", "file_type": "code", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L68"}], "edges": [{"source": "src_lib_server_services_projects_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_projects_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_projects_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_projects_ts", "target": "projects_createproject", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L16", "weight": 1.0}, {"source": "src_lib_server_services_projects_ts", "target": "projects_listprojects", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L31", "weight": 1.0}, {"source": "src_lib_server_services_projects_ts", "target": "projects_getproject", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L39", "weight": 1.0}, {"source": "src_lib_server_services_projects_ts", "target": "projects_updateproject", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L50", "weight": 1.0}, {"source": "src_lib_server_services_projects_ts", "target": "projects_softdeleteproject", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L68", "weight": 1.0}], "raw_calls": [{"caller_nid": "projects_createproject", "callee": "trim", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L19"}, {"caller_nid": "projects_createproject", "callee": "returning", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L27"}, {"caller_nid": "projects_createproject", "callee": "values", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L27"}, {"caller_nid": "projects_createproject", "callee": "insert", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L27"}, {"caller_nid": "projects_listprojects", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L32"}, {"caller_nid": "projects_listprojects", "callee": "where", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L32"}, {"caller_nid": "projects_listprojects", "callee": "from", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L32"}, {"caller_nid": "projects_listprojects", "callee": "select", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L32"}, {"caller_nid": "projects_listprojects", "callee": "and", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L35"}, {"caller_nid": "projects_listprojects", "callee": "eq", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L35"}, {"caller_nid": "projects_listprojects", "callee": "isNull", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L35"}, {"caller_nid": "projects_listprojects", "callee": "desc", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L36"}, {"caller_nid": "projects_getproject", "callee": "limit", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L40"}, {"caller_nid": "projects_getproject", "callee": "where", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L40"}, {"caller_nid": "projects_getproject", "callee": "from", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L40"}, {"caller_nid": "projects_getproject", "callee": "select", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L40"}, {"caller_nid": "projects_getproject", "callee": "and", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L44"}, {"caller_nid": "projects_getproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L44"}, {"caller_nid": "projects_getproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L44"}, {"caller_nid": "projects_getproject", "callee": "isNull", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L44"}, {"caller_nid": "projects_updateproject", "callee": "where", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L55"}, {"caller_nid": "projects_updateproject", "callee": "set", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L55"}, {"caller_nid": "projects_updateproject", "callee": "update", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L55"}, {"caller_nid": "projects_updateproject", "callee": "trim", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L58"}, {"caller_nid": "projects_updateproject", "callee": "and", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L65"}, {"caller_nid": "projects_updateproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L65"}, {"caller_nid": "projects_updateproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L65"}, {"caller_nid": "projects_softdeleteproject", "callee": "where", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L69"}, {"caller_nid": "projects_softdeleteproject", "callee": "set", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L69"}, {"caller_nid": "projects_softdeleteproject", "callee": "update", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L69"}, {"caller_nid": "projects_softdeleteproject", "callee": "sql", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L71"}, {"caller_nid": "projects_softdeleteproject", "callee": "and", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L72"}, {"caller_nid": "projects_softdeleteproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L72"}, {"caller_nid": "projects_softdeleteproject", "callee": "eq", "source_file": "src\\lib\\server\\services\\projects.ts", "source_location": "L72"}]} \ No newline at end of file diff --git a/graphify-out/cache/83dd9f09cfa879458ad505a806d8e2be5321c40cfdc5dd6f717d4c71dd328234.json b/graphify-out/cache/83dd9f09cfa879458ad505a806d8e2be5321c40cfdc5dd6f717d4c71dd328234.json new file mode 100644 index 0000000..fde1b44 --- /dev/null +++ b/graphify-out/cache/83dd9f09cfa879458ad505a806d8e2be5321c40cfdc5dd6f717d4c71dd328234.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_api_files_server_ts", "label": "+server.ts", "file_type": "code", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L1"}, {"id": "server_get", "label": "GET()", "file_type": "code", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_api_files_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_api_files_server_ts", "target": "storage", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_api_files_server_ts", "target": "local", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_api_files_server_ts", "target": "src_routes_api_files_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_api_files_server_ts", "target": "server_get", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "server_get", "callee": "getStorage", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L7"}, {"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L9"}, {"caller_nid": "server_get", "callee": "verifySignedUrl", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L14"}, {"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L16"}, {"caller_nid": "server_get", "callee": "catch", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L19"}, {"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L20"}, {"caller_nid": "server_get", "callee": "String", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L24"}, {"caller_nid": "server_get", "callee": "replace", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L29"}, {"caller_nid": "server_get", "callee": "replace", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L30"}, {"caller_nid": "server_get", "callee": "set", "source_file": "src\\routes\\api\\files\\+server.ts", "source_location": "L31"}]} \ No newline at end of file diff --git a/graphify-out/cache/856fc41f954cbec94ccc8fd7bccdbd0d3d8582cfb7e4ee7a00f3544d5513b88d.json b/graphify-out/cache/856fc41f954cbec94ccc8fd7bccdbd0d3d8582cfb7e4ee7a00f3544d5513b88d.json new file mode 100644 index 0000000..842a372 --- /dev/null +++ b/graphify-out/cache/856fc41f954cbec94ccc8fd7bccdbd0d3d8582cfb7e4ee7a00f3544d5513b88d.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_shared_ts", "label": "_shared.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L1"}, {"id": "shared_pk", "label": "pk()", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L81"}, {"id": "shared_fk", "label": "fk()", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L82"}, {"id": "shared_createdat", "label": "createdAt()", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L83"}, {"id": "shared_updatedat", "label": "updatedAt()", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L85"}, {"id": "shared_deletedat", "label": "deletedAt()", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L87"}, {"id": "shared_slugcol", "label": "slugCol()", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L88"}], "edges": [{"source": "src_lib_server_db_schema_shared_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_shared_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_shared_ts", "target": "shared_pk", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L81", "weight": 1.0}, {"source": "src_lib_server_db_schema_shared_ts", "target": "shared_fk", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L82", "weight": 1.0}, {"source": "src_lib_server_db_schema_shared_ts", "target": "shared_createdat", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L83", "weight": 1.0}, {"source": "src_lib_server_db_schema_shared_ts", "target": "shared_updatedat", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L85", "weight": 1.0}, {"source": "src_lib_server_db_schema_shared_ts", "target": "shared_deletedat", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L87", "weight": 1.0}, {"source": "src_lib_server_db_schema_shared_ts", "target": "shared_slugcol", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L88", "weight": 1.0}], "raw_calls": [{"caller_nid": "shared_pk", "callee": "default", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L81"}, {"caller_nid": "shared_pk", "callee": "primaryKey", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L81"}, {"caller_nid": "shared_pk", "callee": "uuid", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L81"}, {"caller_nid": "shared_pk", "callee": "sql", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L81"}, {"caller_nid": "shared_fk", "callee": "uuid", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L82"}, {"caller_nid": "shared_createdat", "callee": "defaultNow", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L84"}, {"caller_nid": "shared_createdat", "callee": "notNull", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L84"}, {"caller_nid": "shared_createdat", "callee": "timestamp", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L84"}, {"caller_nid": "shared_updatedat", "callee": "defaultNow", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L86"}, {"caller_nid": "shared_updatedat", "callee": "notNull", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L86"}, {"caller_nid": "shared_updatedat", "callee": "timestamp", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L86"}, {"caller_nid": "shared_deletedat", "callee": "timestamp", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L87"}, {"caller_nid": "shared_slugcol", "callee": "notNull", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L88"}, {"caller_nid": "shared_slugcol", "callee": "varchar", "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", "source_location": "L88"}]} \ No newline at end of file diff --git a/graphify-out/cache/86daf59e0f40f2687f36bcf098680e89c2b438d156c86680ffddc325ea27a107.json b/graphify-out/cache/86daf59e0f40f2687f36bcf098680e89c2b438d156c86680ffddc325ea27a107.json new file mode 100644 index 0000000..097a759 --- /dev/null +++ b/graphify-out/cache/86daf59e0f40f2687f36bcf098680e89c2b438d156c86680ffddc325ea27a107.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_asset_types_id_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/893047206aaab38a2375ddc2aa29c6023f394ebeacdfc6baf5f01b86056145dc.json b/graphify-out/cache/893047206aaab38a2375ddc2aa29c6023f394ebeacdfc6baf5f01b86056145dc.json new file mode 100644 index 0000000..a5e9102 --- /dev/null +++ b/graphify-out/cache/893047206aaab38a2375ddc2aa29c6023f394ebeacdfc6baf5f01b86056145dc.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/894244f6685d2493b0f06aec6068ac9dfe46c9cd8df8191ae425514c290c736b.json b/graphify-out/cache/894244f6685d2493b0f06aec6068ac9dfe46c9cd8df8191ae425514c290c736b.json new file mode 100644 index 0000000..c2705d5 --- /dev/null +++ b/graphify-out/cache/894244f6685d2493b0f06aec6068ac9dfe46c9cd8df8191ae425514c290c736b.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_slug_history_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/8ba19eb988ec9b427bdc8e8be1a9839e82c0b422f0758e13b6185471090f4e5e.json b/graphify-out/cache/8ba19eb988ec9b427bdc8e8be1a9839e82c0b422f0758e13b6185471090f4e5e.json new file mode 100644 index 0000000..c280339 --- /dev/null +++ b/graphify-out/cache/8ba19eb988ec9b427bdc8e8be1a9839e82c0b422f0758e13b6185471090f4e5e.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_slug_revisions_rev_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/8bcee36e9aafa3fcd8cf5404337f3e2d63d0060478d65f083c614b1d626a16a3.json b/graphify-out/cache/8bcee36e9aafa3fcd8cf5404337f3e2d63d0060478d65f083c614b1d626a16a3.json new file mode 100644 index 0000000..4bdb22d --- /dev/null +++ b/graphify-out/cache/8bcee36e9aafa3fcd8cf5404337f3e2d63d0060478d65f083c614b1d626a16a3.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/8d7824805dba6e4948c6fc27f0c4aeb45ad80349e0c81126c31c06d51ada41af.json b/graphify-out/cache/8d7824805dba6e4948c6fc27f0c4aeb45ad80349e0c81126c31c06d51ada41af.json new file mode 100644 index 0000000..3e13055 --- /dev/null +++ b/graphify-out/cache/8d7824805dba6e4948c6fc27f0c4aeb45ad80349e0c81126c31c06d51ada41af.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_users_new_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/8f47333eee1377feca3117362c632aae469ce7291fd56c46897329b293c97e85.json b/graphify-out/cache/8f47333eee1377feca3117362c632aae469ce7291fd56c46897329b293c97e85.json new file mode 100644 index 0000000..6d1e72b --- /dev/null +++ b/graphify-out/cache/8f47333eee1377feca3117362c632aae469ce7291fd56c46897329b293c97e85.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_users_new_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L17"}], "edges": [{"source": "src_routes_app_admin_users_new_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_admin_users_new_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_admin_users_new_page_server_ts", "target": "guards", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_admin_users_new_page_server_ts", "target": "users", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_admin_users_new_page_server_ts", "target": "src_routes_app_admin_users_new_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_admin_users_new_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L17", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "requireAdmin", "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", "source_location": "L18"}]} \ No newline at end of file diff --git a/graphify-out/cache/8fe40eef360ec452f2f01626cd20bd1c75259f48b5a8b3e77d6278cbca1e3b7b.json b/graphify-out/cache/8fe40eef360ec452f2f01626cd20bd1c75259f48b5a8b3e77d6278cbca1e3b7b.json new file mode 100644 index 0000000..e9f420f --- /dev/null +++ b/graphify-out/cache/8fe40eef360ec452f2f01626cd20bd1c75259f48b5a8b3e77d6278cbca1e3b7b.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_logout_server_ts", "label": "+server.ts", "file_type": "code", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L1"}, {"id": "server_handlelogout", "label": "handleLogout()", "file_type": "code", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_logout_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_logout_server_ts", "target": "session", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_logout_server_ts", "target": "src_routes_logout_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_logout_server_ts", "target": "server_handlelogout", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "server_handlelogout", "callee": "invalidateSession", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L7"}, {"caller_nid": "server_handlelogout", "callee": "delete", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L9"}, {"caller_nid": "server_handlelogout", "callee": "redirect", "source_file": "src\\routes\\logout\\+server.ts", "source_location": "L10"}]} \ No newline at end of file diff --git a/graphify-out/cache/90981b6651af5cc4ecfb7c594f941b4f49259a1937e66e95a778979d1de92637.json b/graphify-out/cache/90981b6651af5cc4ecfb7c594f941b4f49259a1937e66e95a778979d1de92637.json new file mode 100644 index 0000000..bea5dcc --- /dev/null +++ b/graphify-out/cache/90981b6651af5cc4ecfb7c594f941b4f49259a1937e66e95a778979d1de92637.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_export_csv_server_ts", "label": "+server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L1"}, {"id": "server_get", "label": "GET()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L6"}, {"id": "server_today", "label": "today()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L54"}], "edges": [{"source": "src_routes_app_assets_export_csv_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_export_csv_server_ts", "target": "csv", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_export_csv_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_export_csv_server_ts", "target": "src_routes_app_assets_export_csv_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_export_csv_server_ts", "target": "server_get", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_export_csv_server_ts", "target": "server_today", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L54", "weight": 1.0}, {"source": "server_get", "target": "server_today", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L51", "weight": 1.0}], "raw_calls": [{"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L7"}, {"caller_nid": "server_get", "callee": "listAssets", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L13"}, {"caller_nid": "server_get", "callee": "toCsv", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L22"}, {"caller_nid": "server_get", "callee": "map", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L23"}, {"caller_nid": "server_get", "callee": "csvResponse", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L51"}, {"caller_nid": "server_today", "callee": "slice", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L55"}, {"caller_nid": "server_today", "callee": "toISOString", "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", "source_location": "L55"}]} \ No newline at end of file diff --git a/graphify-out/cache/954456f0eeb3db5b550d89f3646525b38c74f071b61835174c94bbe075954827.json b/graphify-out/cache/954456f0eeb3db5b550d89f3646525b38c74f071b61835174c94bbe075954827.json new file mode 100644 index 0000000..91885da --- /dev/null +++ b/graphify-out/cache/954456f0eeb3db5b550d89f3646525b38c74f071b61835174c94bbe075954827.json @@ -0,0 +1 @@ +{"nodes": [{"id": "scripts_create_user_ts", "label": "create-user.ts", "file_type": "code", "source_file": "scripts\\create-user.ts", "source_location": "L1"}, {"id": "create_user_slugify", "label": "slugify()", "file_type": "code", "source_file": "scripts\\create-user.ts", "source_location": "L9"}, {"id": "create_user_stripsurroundingquotes", "label": "stripSurroundingQuotes()", "file_type": "code", "source_file": "scripts\\create-user.ts", "source_location": "L16"}, {"id": "create_user_readarg", "label": "readArg()", "file_type": "code", "source_file": "scripts\\create-user.ts", "source_location": "L26"}, {"id": "create_user_main", "label": "main()", "file_type": "code", "source_file": "scripts\\create-user.ts", "source_location": "L31"}], "edges": [{"source": "scripts_create_user_ts", "target": "config", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L1", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L2", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "src_lib_server_db_client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L3", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "src_lib_server_db_client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L4", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L5", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "src_lib_server_auth_password", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L6", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "src_lib_utils_email", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L7", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "create_user_slugify", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L9", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "create_user_stripsurroundingquotes", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L16", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "create_user_readarg", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L26", "weight": 1.0}, {"source": "scripts_create_user_ts", "target": "create_user_main", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L31", "weight": 1.0}, {"source": "create_user_readarg", "target": "create_user_stripsurroundingquotes", "relation": "calls", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L28", "weight": 1.0}, {"source": "create_user_main", "target": "create_user_readarg", "relation": "calls", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L32", "weight": 1.0}, {"source": "create_user_main", "target": "create_user_slugify", "relation": "calls", "confidence": "EXTRACTED", "source_file": "scripts\\create-user.ts", "source_location": "L62", "weight": 1.0}], "raw_calls": [{"caller_nid": "create_user_slugify", "callee": "replace", "source_file": "scripts\\create-user.ts", "source_location": "L10"}, {"caller_nid": "create_user_slugify", "callee": "replace", "source_file": "scripts\\create-user.ts", "source_location": "L10"}, {"caller_nid": "create_user_slugify", "callee": "toLowerCase", "source_file": "scripts\\create-user.ts", "source_location": "L10"}, {"caller_nid": "create_user_stripsurroundingquotes", "callee": "slice", "source_file": "scripts\\create-user.ts", "source_location": "L21"}, {"caller_nid": "create_user_readarg", "callee": "indexOf", "source_file": "scripts\\create-user.ts", "source_location": "L27"}, {"caller_nid": "create_user_main", "callee": "error", "source_file": "scripts\\create-user.ts", "source_location": "L39"}, {"caller_nid": "create_user_main", "callee": "exit", "source_file": "scripts\\create-user.ts", "source_location": "L40"}, {"caller_nid": "create_user_main", "callee": "normalizeEmail", "source_file": "scripts\\create-user.ts", "source_location": "L43"}, {"caller_nid": "create_user_main", "callee": "hashPassword", "source_file": "scripts\\create-user.ts", "source_location": "L44"}, {"caller_nid": "create_user_main", "callee": "limit", "source_file": "scripts\\create-user.ts", "source_location": "L46"}, {"caller_nid": "create_user_main", "callee": "where", "source_file": "scripts\\create-user.ts", "source_location": "L46"}, {"caller_nid": "create_user_main", "callee": "from", "source_file": "scripts\\create-user.ts", "source_location": "L46"}, {"caller_nid": "create_user_main", "callee": "select", "source_file": "scripts\\create-user.ts", "source_location": "L46"}, {"caller_nid": "create_user_main", "callee": "eq", "source_file": "scripts\\create-user.ts", "source_location": "L46"}, {"caller_nid": "create_user_main", "callee": "log", "source_file": "scripts\\create-user.ts", "source_location": "L49"}, {"caller_nid": "create_user_main", "callee": "where", "source_file": "scripts\\create-user.ts", "source_location": "L50"}, {"caller_nid": "create_user_main", "callee": "set", "source_file": "scripts\\create-user.ts", "source_location": "L50"}, {"caller_nid": "create_user_main", "callee": "update", "source_file": "scripts\\create-user.ts", "source_location": "L50"}, {"caller_nid": "create_user_main", "callee": "eq", "source_file": "scripts\\create-user.ts", "source_location": "L50"}, {"caller_nid": "create_user_main", "callee": "returning", "source_file": "scripts\\create-user.ts", "source_location": "L53"}, {"caller_nid": "create_user_main", "callee": "values", "source_file": "scripts\\create-user.ts", "source_location": "L53"}, {"caller_nid": "create_user_main", "callee": "insert", "source_file": "scripts\\create-user.ts", "source_location": "L53"}, {"caller_nid": "create_user_main", "callee": "log", "source_file": "scripts\\create-user.ts", "source_location": "L58"}, {"caller_nid": "create_user_main", "callee": "limit", "source_file": "scripts\\create-user.ts", "source_location": "L65"}, {"caller_nid": "create_user_main", "callee": "where", "source_file": "scripts\\create-user.ts", "source_location": "L65"}, {"caller_nid": "create_user_main", "callee": "from", "source_file": "scripts\\create-user.ts", "source_location": "L65"}, {"caller_nid": "create_user_main", "callee": "select", "source_file": "scripts\\create-user.ts", "source_location": "L65"}, {"caller_nid": "create_user_main", "callee": "eq", "source_file": "scripts\\create-user.ts", "source_location": "L65"}, {"caller_nid": "create_user_main", "callee": "returning", "source_file": "scripts\\create-user.ts", "source_location": "L67"}, {"caller_nid": "create_user_main", "callee": "values", "source_file": "scripts\\create-user.ts", "source_location": "L67"}, {"caller_nid": "create_user_main", "callee": "insert", "source_file": "scripts\\create-user.ts", "source_location": "L67"}, {"caller_nid": "create_user_main", "callee": "log", "source_file": "scripts\\create-user.ts", "source_location": "L72"}, {"caller_nid": "create_user_main", "callee": "where", "source_file": "scripts\\create-user.ts", "source_location": "L74"}, {"caller_nid": "create_user_main", "callee": "set", "source_file": "scripts\\create-user.ts", "source_location": "L74"}, {"caller_nid": "create_user_main", "callee": "update", "source_file": "scripts\\create-user.ts", "source_location": "L74"}, {"caller_nid": "create_user_main", "callee": "eq", "source_file": "scripts\\create-user.ts", "source_location": "L74"}, {"caller_nid": "create_user_main", "callee": "log", "source_file": "scripts\\create-user.ts", "source_location": "L75"}, {"caller_nid": "create_user_main", "callee": "stringify", "source_file": "scripts\\create-user.ts", "source_location": "L76"}, {"caller_nid": "create_user_main", "callee": "stringify", "source_file": "scripts\\create-user.ts", "source_location": "L76"}, {"caller_nid": "create_user_main", "callee": "limit", "source_file": "scripts\\create-user.ts", "source_location": "L81"}, {"caller_nid": "create_user_main", "callee": "where", "source_file": "scripts\\create-user.ts", "source_location": "L81"}, {"caller_nid": "create_user_main", "callee": "from", "source_file": "scripts\\create-user.ts", "source_location": "L81"}, {"caller_nid": "create_user_main", "callee": "select", "source_file": "scripts\\create-user.ts", "source_location": "L81"}, {"caller_nid": "create_user_main", "callee": "and", "source_file": "scripts\\create-user.ts", "source_location": "L84"}, {"caller_nid": "create_user_main", "callee": "eq", "source_file": "scripts\\create-user.ts", "source_location": "L84"}, {"caller_nid": "create_user_main", "callee": "eq", "source_file": "scripts\\create-user.ts", "source_location": "L84"}, {"caller_nid": "create_user_main", "callee": "onConflictDoNothing", "source_file": "scripts\\create-user.ts", "source_location": "L87"}, {"caller_nid": "create_user_main", "callee": "values", "source_file": "scripts\\create-user.ts", "source_location": "L87"}, {"caller_nid": "create_user_main", "callee": "insert", "source_file": "scripts\\create-user.ts", "source_location": "L87"}, {"caller_nid": "create_user_main", "callee": "log", "source_file": "scripts\\create-user.ts", "source_location": "L91"}, {"caller_nid": "create_user_main", "callee": "where", "source_file": "scripts\\create-user.ts", "source_location": "L93"}, {"caller_nid": "create_user_main", "callee": "set", "source_file": "scripts\\create-user.ts", "source_location": "L93"}, {"caller_nid": "create_user_main", "callee": "update", "source_file": "scripts\\create-user.ts", "source_location": "L93"}, {"caller_nid": "create_user_main", "callee": "eq", "source_file": "scripts\\create-user.ts", "source_location": "L93"}, {"caller_nid": "create_user_main", "callee": "log", "source_file": "scripts\\create-user.ts", "source_location": "L94"}, {"caller_nid": "create_user_main", "callee": "end", "source_file": "scripts\\create-user.ts", "source_location": "L98"}]} \ No newline at end of file diff --git a/graphify-out/cache/95939b720c184dbbbb789415cba3a6faf49324ae2d86052bcfab6e3990e13aae.json b/graphify-out/cache/95939b720c184dbbbb789415cba3a6faf49324ae2d86052bcfab6e3990e13aae.json new file mode 100644 index 0000000..c1be07e --- /dev/null +++ b/graphify-out/cache/95939b720c184dbbbb789415cba3a6faf49324ae2d86052bcfab6e3990e13aae.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_components_topbar_svelte", "label": "TopBar.svelte", "file_type": "code", "source_file": "src\\lib\\components\\TopBar.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/965ba10e3f40ac54028b5274cc5c6a9f36809ec375519cfa03fe7dfa10431d4a.json b/graphify-out/cache/965ba10e3f40ac54028b5274cc5c6a9f36809ec375519cfa03fe7dfa10431d4a.json new file mode 100644 index 0000000..1433c8e --- /dev/null +++ b/graphify-out/cache/965ba10e3f40ac54028b5274cc5c6a9f36809ec375519cfa03fe7dfa10431d4a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_new_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_emptytonull", "label": "emptyToNull()", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", "source_location": "L18"}], "edges": [{"source": "src_routes_app_properties_new_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_properties_new_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_properties_new_page_server_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_properties_new_page_server_ts", "target": "src_routes_app_properties_new_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_properties_new_page_server_ts", "target": "page_server_emptytonull", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", "source_location": "L18", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/971c5a6c8f7e0e95121c0ebbeee49eeff8624dbe01d97d667974f476a6350101.json b/graphify-out/cache/971c5a6c8f7e0e95121c0ebbeee49eeff8624dbe01d97d667974f476a6350101.json new file mode 100644 index 0000000..2f6b14f --- /dev/null +++ b/graphify-out/cache/971c5a6c8f7e0e95121c0ebbeee49eeff8624dbe01d97d667974f476a6350101.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_decisions_ts", "label": "decisions.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L1"}, {"id": "decisions_createdecision", "label": "createDecision()", "file_type": "code", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L24"}, {"id": "decisions_decisionscopelink", "label": "decisionScopeLink()", "file_type": "code", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L74"}, {"id": "decisions_listdecisionsforscope", "label": "listDecisionsForScope()", "file_type": "code", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L88"}, {"id": "decisions_softdeletedecision", "label": "softDeleteDecision()", "file_type": "code", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L120"}], "edges": [{"source": "src_lib_server_services_decisions_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_decisions_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_decisions_ts", "target": "decisions", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_decisions_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_decisions_ts", "target": "src_lib_server_services_notifications", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_services_decisions_ts", "target": "decisions_createdecision", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L24", "weight": 1.0}, {"source": "src_lib_server_services_decisions_ts", "target": "decisions_decisionscopelink", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L74", "weight": 1.0}, {"source": "src_lib_server_services_decisions_ts", "target": "decisions_listdecisionsforscope", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L88", "weight": 1.0}, {"source": "src_lib_server_services_decisions_ts", "target": "decisions_softdeletedecision", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L120", "weight": 1.0}, {"source": "decisions_createdecision", "target": "decisions_decisionscopelink", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L60", "weight": 1.0}], "raw_calls": [{"caller_nid": "decisions_createdecision", "callee": "trim", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L31"}, {"caller_nid": "decisions_createdecision", "callee": "String", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L34"}, {"caller_nid": "decisions_createdecision", "callee": "toUpperCase", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L35"}, {"caller_nid": "decisions_createdecision", "callee": "returning", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L41"}, {"caller_nid": "decisions_createdecision", "callee": "values", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L41"}, {"caller_nid": "decisions_createdecision", "callee": "insert", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L41"}, {"caller_nid": "decisions_createdecision", "callee": "where", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L47"}, {"caller_nid": "decisions_createdecision", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L47"}, {"caller_nid": "decisions_createdecision", "callee": "from", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L47"}, {"caller_nid": "decisions_createdecision", "callee": "select", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L47"}, {"caller_nid": "decisions_createdecision", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L50"}, {"caller_nid": "decisions_createdecision", "callee": "and", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L52"}, {"caller_nid": "decisions_createdecision", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L53"}, {"caller_nid": "decisions_createdecision", "callee": "inArray", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L54"}, {"caller_nid": "decisions_createdecision", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L55"}, {"caller_nid": "decisions_createdecision", "callee": "ne", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L56"}, {"caller_nid": "decisions_createdecision", "callee": "notify", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L61"}, {"caller_nid": "decisions_createdecision", "callee": "map", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L63"}, {"caller_nid": "decisions_createdecision", "callee": "trim", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L65"}, {"caller_nid": "decisions_createdecision", "callee": "slice", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L66"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L93"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "where", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L93"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "leftJoin", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L93"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "from", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L93"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "select", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L93"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L108"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "and", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L110"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L111"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L112"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L113"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "isNull", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L114"}, {"caller_nid": "decisions_listdecisionsforscope", "callee": "desc", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L117"}, {"caller_nid": "decisions_softdeletedecision", "callee": "where", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L121"}, {"caller_nid": "decisions_softdeletedecision", "callee": "set", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L121"}, {"caller_nid": "decisions_softdeletedecision", "callee": "update", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L121"}, {"caller_nid": "decisions_softdeletedecision", "callee": "and", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L124"}, {"caller_nid": "decisions_softdeletedecision", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L124"}, {"caller_nid": "decisions_softdeletedecision", "callee": "eq", "source_file": "src\\lib\\server\\services\\decisions.ts", "source_location": "L124"}]} \ No newline at end of file diff --git a/graphify-out/cache/97c117a638ba0b06b16e7c98a102860b68f29569b1b66a15cb8b170bf876309a.json b/graphify-out/cache/97c117a638ba0b06b16e7c98a102860b68f29569b1b66a15cb8b170bf876309a.json new file mode 100644 index 0000000..622c5be --- /dev/null +++ b/graphify-out/cache/97c117a638ba0b06b16e7c98a102860b68f29569b1b66a15cb8b170bf876309a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_components_sidebar_svelte", "label": "Sidebar.svelte", "file_type": "code", "source_file": "src\\lib\\components\\Sidebar.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/97cc518cbba070e27211eab0c091ea2867e30e2f4d2bc2d0a7d41ee8ebc03835.json b/graphify-out/cache/97cc518cbba070e27211eab0c091ea2867e30e2f4d2bc2d0a7d41ee8ebc03835.json new file mode 100644 index 0000000..656a3f0 --- /dev/null +++ b/graphify-out/cache/97cc518cbba070e27211eab0c091ea2867e30e2f4d2bc2d0a7d41ee8ebc03835.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_checklists_id_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/9cc3de2dbe870bb70600b46b642a1017ca3d6ef322df904ec5379ac73ab0dad7.json b/graphify-out/cache/9cc3de2dbe870bb70600b46b642a1017ca3d6ef322df904ec5379ac73ab0dad7.json new file mode 100644 index 0000000..baf690c --- /dev/null +++ b/graphify-out/cache/9cc3de2dbe870bb70600b46b642a1017ca3d6ef322df904ec5379ac73ab0dad7.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_company_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_parsesettings", "label": "parseSettings()", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L19"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L28"}], "edges": [{"source": "src_routes_app_admin_company_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_admin_company_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_admin_company_page_server_ts", "target": "guards", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_admin_company_page_server_ts", "target": "companies", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_admin_company_page_server_ts", "target": "src_routes_app_admin_company_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_admin_company_page_server_ts", "target": "page_server_parsesettings", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L19", "weight": 1.0}, {"source": "src_routes_app_admin_company_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L28", "weight": 1.0}, {"source": "page_server_load", "target": "page_server_parsesettings", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L34", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_parsesettings", "callee": "parse", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L22"}, {"caller_nid": "page_server_load", "callee": "requireCompany", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L29"}, {"caller_nid": "page_server_load", "callee": "getCompany", "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", "source_location": "L30"}]} \ No newline at end of file diff --git a/graphify-out/cache/9fbc1364bce64349380e734b795336b981c0d6bc8f92ce485a6fde98dbfba590.json b/graphify-out/cache/9fbc1364bce64349380e734b795336b981c0d6bc8f92ce485a6fde98dbfba590.json new file mode 100644 index 0000000..233a881 --- /dev/null +++ b/graphify-out/cache/9fbc1364bce64349380e734b795336b981c0d6bc8f92ce485a6fde98dbfba590.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/a0f5756d4e2ef907308a9d97bc49cc908abe589d7d3f3cfb52532b2747a48692.json b/graphify-out/cache/a0f5756d4e2ef907308a9d97bc49cc908abe589d7d3f3cfb52532b2747a48692.json new file mode 100644 index 0000000..600530f --- /dev/null +++ b/graphify-out/cache/a0f5756d4e2ef907308a9d97bc49cc908abe589d7d3f3cfb52532b2747a48692.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_projects_ts", "label": "projects.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\projects.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_projects_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\projects.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_projects_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\projects.ts", "source_location": "L11", "weight": 1.0}, {"source": "src_lib_server_db_schema_projects_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\projects.ts", "source_location": "L12", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/a11a11192dd1666bae166440340ef7ab925ee04628d222071efe9fa45f14d416.json b/graphify-out/cache/a11a11192dd1666bae166440340ef7ab925ee04628d222071efe9fa45f14d416.json new file mode 100644 index 0000000..05e4c31 --- /dev/null +++ b/graphify-out/cache/a11a11192dd1666bae166440340ef7ab925ee04628d222071efe9fa45f14d416.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_documents_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/a2aeb75c9384b0b50c03b9624f2787127d6c3a2f3b458c4f1511c0f765a6f6c9.json b/graphify-out/cache/a2aeb75c9384b0b50c03b9624f2787127d6c3a2f3b458c4f1511c0f765a6f6c9.json new file mode 100644 index 0000000..4bdc934 --- /dev/null +++ b/graphify-out/cache/a2aeb75c9384b0b50c03b9624f2787127d6c3a2f3b458c4f1511c0f765a6f6c9.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_companies_ts", "label": "companies.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L1"}, {"id": "companies_slugify", "label": "slugify()", "file_type": "code", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L5"}, {"id": "companies_getcompany", "label": "getCompany()", "file_type": "code", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L15"}, {"id": "companies_updatecompany", "label": "updateCompany()", "file_type": "code", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L24"}, {"id": "companies_createcompanywithadmin", "label": "createCompanyWithAdmin()", "file_type": "code", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L39"}], "edges": [{"source": "src_lib_server_services_companies_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_companies_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_companies_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_companies_ts", "target": "companies_slugify", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_services_companies_ts", "target": "companies_getcompany", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L15", "weight": 1.0}, {"source": "src_lib_server_services_companies_ts", "target": "companies_updatecompany", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L24", "weight": 1.0}, {"source": "src_lib_server_services_companies_ts", "target": "companies_createcompanywithadmin", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L39", "weight": 1.0}, {"source": "companies_updatecompany", "target": "companies_slugify", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L31", "weight": 1.0}, {"source": "companies_createcompanywithadmin", "target": "companies_slugify", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L47", "weight": 1.0}], "raw_calls": [{"caller_nid": "companies_slugify", "callee": "slice", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L6"}, {"caller_nid": "companies_slugify", "callee": "replace", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L6"}, {"caller_nid": "companies_slugify", "callee": "replace", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L6"}, {"caller_nid": "companies_slugify", "callee": "replace", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L6"}, {"caller_nid": "companies_slugify", "callee": "normalize", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L6"}, {"caller_nid": "companies_slugify", "callee": "toLowerCase", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L6"}, {"caller_nid": "companies_getcompany", "callee": "limit", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L16"}, {"caller_nid": "companies_getcompany", "callee": "where", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L16"}, {"caller_nid": "companies_getcompany", "callee": "from", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L16"}, {"caller_nid": "companies_getcompany", "callee": "select", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L16"}, {"caller_nid": "companies_getcompany", "callee": "and", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L19"}, {"caller_nid": "companies_getcompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L19"}, {"caller_nid": "companies_getcompany", "callee": "isNull", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L19"}, {"caller_nid": "companies_updatecompany", "callee": "trim", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L29"}, {"caller_nid": "companies_updatecompany", "callee": "where", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L36"}, {"caller_nid": "companies_updatecompany", "callee": "set", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L36"}, {"caller_nid": "companies_updatecompany", "callee": "update", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L36"}, {"caller_nid": "companies_updatecompany", "callee": "eq", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L36"}, {"caller_nid": "companies_createcompanywithadmin", "callee": "trim", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L45"}, {"caller_nid": "companies_createcompanywithadmin", "callee": "trim", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L47"}, {"caller_nid": "companies_createcompanywithadmin", "callee": "transaction", "source_file": "src\\lib\\server\\services\\companies.ts", "source_location": "L50"}]} \ No newline at end of file diff --git a/graphify-out/cache/a4c7e4b627713ef4009d2edac4ec4bc576a8b1f1b6f37e30b65cb0d71e51336b.json b/graphify-out/cache/a4c7e4b627713ef4009d2edac4ec4bc576a8b1f1b6f37e30b65cb0d71e51336b.json new file mode 100644 index 0000000..7ed712b --- /dev/null +++ b/graphify-out/cache/a4c7e4b627713ef4009d2edac4ec4bc576a8b1f1b6f37e30b65cb0d71e51336b.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_validation_custom_fields_ts", "label": "custom-fields.ts", "file_type": "code", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L1"}, {"id": "custom_fields_validatorfor", "label": "validatorFor()", "file_type": "code", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L24"}, {"id": "custom_fields_buildcustomfieldsschema", "label": "buildCustomFieldsSchema()", "file_type": "code", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L70"}, {"id": "custom_fields_getcachedcustomfieldsschema", "label": "getCachedCustomFieldsSchema()", "file_type": "code", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L99"}, {"id": "custom_fields_clearcustomfieldscache", "label": "clearCustomFieldsCache()", "file_type": "code", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L111"}], "edges": [{"source": "src_lib_server_validation_custom_fields_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_validation_custom_fields_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_validation_custom_fields_ts", "target": "custom_fields_validatorfor", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L24", "weight": 1.0}, {"source": "src_lib_server_validation_custom_fields_ts", "target": "custom_fields_buildcustomfieldsschema", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L70", "weight": 1.0}, {"source": "src_lib_server_validation_custom_fields_ts", "target": "custom_fields_getcachedcustomfieldsschema", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L99", "weight": 1.0}, {"source": "src_lib_server_validation_custom_fields_ts", "target": "custom_fields_clearcustomfieldscache", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L111", "weight": 1.0}, {"source": "custom_fields_buildcustomfieldsschema", "target": "custom_fields_validatorfor", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L73", "weight": 1.0}, {"source": "custom_fields_getcachedcustomfieldsschema", "target": "custom_fields_buildcustomfieldsschema", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L106", "weight": 1.0}], "raw_calls": [{"caller_nid": "custom_fields_validatorfor", "callee": "max", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L28"}, {"caller_nid": "custom_fields_validatorfor", "callee": "string", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L28"}, {"caller_nid": "custom_fields_validatorfor", "callee": "int", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L30"}, {"caller_nid": "custom_fields_validatorfor", "callee": "number", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L30"}, {"caller_nid": "custom_fields_validatorfor", "callee": "number", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L32"}, {"caller_nid": "custom_fields_validatorfor", "callee": "boolean", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L34"}, {"caller_nid": "custom_fields_validatorfor", "callee": "min", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L36"}, {"caller_nid": "custom_fields_validatorfor", "callee": "string", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L36"}, {"caller_nid": "custom_fields_validatorfor", "callee": "url", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L44"}, {"caller_nid": "custom_fields_validatorfor", "callee": "string", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L44"}, {"caller_nid": "custom_fields_validatorfor", "callee": "email", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L46"}, {"caller_nid": "custom_fields_validatorfor", "callee": "string", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L46"}, {"caller_nid": "custom_fields_validatorfor", "callee": "string", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L49"}, {"caller_nid": "custom_fields_validatorfor", "callee": "enum", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L50"}, {"caller_nid": "custom_fields_validatorfor", "callee": "max", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L54"}, {"caller_nid": "custom_fields_validatorfor", "callee": "array", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L54"}, {"caller_nid": "custom_fields_validatorfor", "callee": "string", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L54"}, {"caller_nid": "custom_fields_validatorfor", "callee": "max", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L55"}, {"caller_nid": "custom_fields_validatorfor", "callee": "array", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L55"}, {"caller_nid": "custom_fields_validatorfor", "callee": "enum", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L55"}, {"caller_nid": "custom_fields_validatorfor", "callee": "uuid", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L58"}, {"caller_nid": "custom_fields_validatorfor", "callee": "string", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L58"}, {"caller_nid": "custom_fields_buildcustomfieldsschema", "callee": "nullable", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L75"}, {"caller_nid": "custom_fields_buildcustomfieldsschema", "callee": "optional", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L75"}, {"caller_nid": "custom_fields_buildcustomfieldsschema", "callee": "map", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L78"}, {"caller_nid": "custom_fields_buildcustomfieldsschema", "callee": "passthrough", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L79"}, {"caller_nid": "custom_fields_buildcustomfieldsschema", "callee": "object", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L79"}, {"caller_nid": "custom_fields_buildcustomfieldsschema", "callee": "transform", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L80"}, {"caller_nid": "custom_fields_getcachedcustomfieldsschema", "callee": "get", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L104"}, {"caller_nid": "custom_fields_getcachedcustomfieldsschema", "callee": "set", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L107"}, {"caller_nid": "custom_fields_clearcustomfieldscache", "callee": "clear", "source_file": "src\\lib\\server\\validation\\custom-fields.ts", "source_location": "L112"}]} \ No newline at end of file diff --git a/graphify-out/cache/a50de07f7794c1661a26355685f52c3868657207ba28ad34b0c5f481a3f0b1b7.json b/graphify-out/cache/a50de07f7794c1661a26355685f52c3868657207ba28ad34b0c5f481a3f0b1b7.json new file mode 100644 index 0000000..52e4845 --- /dev/null +++ b/graphify-out/cache/a50de07f7794c1661a26355685f52c3868657207ba28ad34b0c5f481a3f0b1b7.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_decisions_ts", "label": "decisions.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\decisions.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_decisions_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\decisions.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_decisions_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\decisions.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_decisions_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\decisions.ts", "source_location": "L3", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/a5dca736edc496f50d8ab51b7ab122ce30b6ea80c889208c86c0849bc07baf77.json b/graphify-out/cache/a5dca736edc496f50d8ab51b7ab122ce30b6ea80c889208c86c0849bc07baf77.json new file mode 100644 index 0000000..0bbd3e7 --- /dev/null +++ b/graphify-out/cache/a5dca736edc496f50d8ab51b7ab122ce30b6ea80c889208c86c0849bc07baf77.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_notifications_matrix_ts", "label": "matrix.ts", "file_type": "code", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L1"}, {"id": "matrix_ismatrixconfigured", "label": "isMatrixConfigured()", "file_type": "code", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L3"}, {"id": "matrix_buildbodies", "label": "buildBodies()", "file_type": "code", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L11"}, {"id": "matrix_sendmatrixmessage", "label": "sendMatrixMessage()", "file_type": "code", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L37"}], "edges": [{"source": "src_lib_server_notifications_matrix_ts", "target": "env", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_notifications_matrix_ts", "target": "matrix_ismatrixconfigured", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_notifications_matrix_ts", "target": "matrix_buildbodies", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L11", "weight": 1.0}, {"source": "src_lib_server_notifications_matrix_ts", "target": "matrix_sendmatrixmessage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L37", "weight": 1.0}, {"source": "matrix_sendmatrixmessage", "target": "matrix_ismatrixconfigured", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L38", "weight": 1.0}, {"source": "matrix_sendmatrixmessage", "target": "matrix_buildbodies", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L40", "weight": 1.0}], "raw_calls": [{"caller_nid": "matrix_ismatrixconfigured", "callee": "Boolean", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L4"}, {"caller_nid": "matrix_buildbodies", "callee": "join", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L12"}, {"caller_nid": "matrix_buildbodies", "callee": "join", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L19"}, {"caller_nid": "matrix_buildbodies", "callee": "map", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L19"}, {"caller_nid": "matrix_buildbodies", "callee": "escapeHtml", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L22"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "now", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L41"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "slice", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L41"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "toString", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L41"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "random", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L41"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "replace", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L42"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "encodeURIComponent", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L42"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "encodeURIComponent", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L42"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "fetch", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L56"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "stringify", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L62"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "catch", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L65"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "text", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L65"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "warn", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L66"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "slice", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L66"}, {"caller_nid": "matrix_sendmatrixmessage", "callee": "warn", "source_file": "src\\lib\\server\\notifications\\matrix.ts", "source_location": "L69"}]} \ No newline at end of file diff --git a/graphify-out/cache/a6cd37167a444b6b876e8e7ef59b0470a768cbada6a4814e6156c011088b2c63.json b/graphify-out/cache/a6cd37167a444b6b876e8e7ef59b0470a768cbada6a4814e6156c011088b2c63.json new file mode 100644 index 0000000..3abc624 --- /dev/null +++ b/graphify-out/cache/a6cd37167a444b6b876e8e7ef59b0470a768cbada6a4814e6156c011088b2c63.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_assets_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/a8a1ec87b34840e2d0b98193f6c6171b63637044231a1f33dd97c5551a873212.json b/graphify-out/cache/a8a1ec87b34840e2d0b98193f6c6171b63637044231a1f33dd97c5551a873212.json new file mode 100644 index 0000000..896e620 --- /dev/null +++ b/graphify-out/cache/a8a1ec87b34840e2d0b98193f6c6171b63637044231a1f33dd97c5551a873212.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_work_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L9"}], "edges": [{"source": "src_routes_app_projects_id_work_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_page_server_ts", "target": "work_packages", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_page_server_ts", "target": "src_routes_app_projects_id_work_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L9", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L10"}, {"caller_nid": "page_server_load", "callee": "listWorkPackagesForProject", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", "source_location": "L11"}]} \ No newline at end of file diff --git a/graphify-out/cache/a9b3ad0a85026475a27d1269bc01423334b1397e4d0dc2417dbd4f6048e4afb1.json b/graphify-out/cache/a9b3ad0a85026475a27d1269bc01423334b1397e4d0dc2417dbd4f6048e4afb1.json new file mode 100644 index 0000000..cfcb4eb --- /dev/null +++ b/graphify-out/cache/a9b3ad0a85026475a27d1269bc01423334b1397e4d0dc2417dbd4f6048e4afb1.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/abe3ad3a9c34a2e2ffac76476d4b5685dd7b9bbde03b2464c131eff33685d9af.json b/graphify-out/cache/abe3ad3a9c34a2e2ffac76476d4b5685dd7b9bbde03b2464c131eff33685d9af.json new file mode 100644 index 0000000..8515461 --- /dev/null +++ b/graphify-out/cache/abe3ad3a9c34a2e2ffac76476d4b5685dd7b9bbde03b2464c131eff33685d9af.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_slug_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/abf3adb6491aae37a7aaf5447d5b22d5fff5e5b34e7ace2c35de0066e7eddc7e.json b/graphify-out/cache/abf3adb6491aae37a7aaf5447d5b22d5fff5e5b34e7ace2c35de0066e7eddc7e.json new file mode 100644 index 0000000..9f7ca41 --- /dev/null +++ b/graphify-out/cache/abf3adb6491aae37a7aaf5447d5b22d5fff5e5b34e7ace2c35de0066e7eddc7e.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_asset_types_new_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\new\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/ac7101f09bc9a56ff2b5b8956a7c8e84bd131ba9a610eb8ec59ab9639acbba41.json b/graphify-out/cache/ac7101f09bc9a56ff2b5b8956a7c8e84bd131ba9a610eb8ec59ab9639acbba41.json new file mode 100644 index 0000000..d05c801 --- /dev/null +++ b/graphify-out/cache/ac7101f09bc9a56ff2b5b8956a7c8e84bd131ba9a610eb8ec59ab9639acbba41.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_work_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/acc103906b0b8485e2ffa7b417e6ed688c70030a2fac2b864dbc14683563f6ab.json b/graphify-out/cache/acc103906b0b8485e2ffa7b417e6ed688c70030a2fac2b864dbc14683563f6ab.json new file mode 100644 index 0000000..1d86f72 --- /dev/null +++ b/graphify-out/cache/acc103906b0b8485e2ffa7b417e6ed688c70030a2fac2b864dbc14683563f6ab.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\+page.server.ts", "source_location": "L4"}], "edges": [{"source": "src_routes_app_page_server_ts", "target": "maintenance", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_page_server_ts", "target": "src_routes_app_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\+page.server.ts", "source_location": "L4", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "all", "source_file": "src\\routes\\(app)\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "countOverdueForCompany", "source_file": "src\\routes\\(app)\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "listDueAndOverdue", "source_file": "src\\routes\\(app)\\+page.server.ts", "source_location": "L10"}]} \ No newline at end of file diff --git a/graphify-out/cache/ad2011ba6d6d8ad0fed8494a1d8fa82a72d8e89adda1b318efe4ef04972f1724.json b/graphify-out/cache/ad2011ba6d6d8ad0fed8494a1d8fa82a72d8e89adda1b318efe4ef04972f1724.json new file mode 100644 index 0000000..0d18faa --- /dev/null +++ b/graphify-out/cache/ad2011ba6d6d8ad0fed8494a1d8fa82a72d8e89adda1b318efe4ef04972f1724.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_documents_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L12"}], "edges": [{"source": "src_routes_app_projects_id_documents_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_documents_page_server_ts", "target": "documents", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_documents_page_server_ts", "target": "src_routes_app_projects_id_documents_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_projects_id_documents_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L12", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "listDocumentsForScope", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L14"}, {"caller_nid": "page_server_load", "callee": "all", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "map", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", "source_location": "L16"}]} \ No newline at end of file diff --git a/graphify-out/cache/ae840709b602213dbec1bb55170547a5a54f170326cf4dd980ce0114d7e708a7.json b/graphify-out/cache/ae840709b602213dbec1bb55170547a5a54f170326cf4dd980ce0114d7e708a7.json new file mode 100644 index 0000000..03041ea --- /dev/null +++ b/graphify-out/cache/ae840709b602213dbec1bb55170547a5a54f170326cf4dd980ce0114d7e708a7.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_asset_types_ts", "label": "asset-types.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L1"}, {"id": "asset_types_slugifytypeslug", "label": "slugifyTypeSlug()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L21"}, {"id": "asset_types_normalizefieldkey", "label": "normalizeFieldKey()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L31"}, {"id": "asset_types_loadeditabletype", "label": "loadEditableType()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L44"}, {"id": "asset_types_createcompanyassettype", "label": "createCompanyAssetType()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L58"}, {"id": "asset_types_updatecompanyassettype", "label": "updateCompanyAssetType()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L83"}, {"id": "asset_types_deletecompanyassettype", "label": "deleteCompanyAssetType()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L100"}, {"id": "asset_types_addfielddef", "label": "addFieldDef()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L136"}, {"id": "asset_types_updatefielddef", "label": "updateFieldDef()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L181"}, {"id": "asset_types_removefielddef", "label": "removeFieldDef()", "file_type": "code", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L230"}], "edges": [{"source": "src_lib_server_services_asset_types_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_slugifytypeslug", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L21", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_normalizefieldkey", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L31", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_loadeditabletype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L44", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_createcompanyassettype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L58", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_updatecompanyassettype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L83", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_deletecompanyassettype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L100", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_addfielddef", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L136", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_updatefielddef", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L181", "weight": 1.0}, {"source": "src_lib_server_services_asset_types_ts", "target": "asset_types_removefielddef", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L230", "weight": 1.0}, {"source": "asset_types_createcompanyassettype", "target": "asset_types_slugifytypeslug", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L67", "weight": 1.0}, {"source": "asset_types_updatecompanyassettype", "target": "asset_types_loadeditabletype", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L88", "weight": 1.0}, {"source": "asset_types_deletecompanyassettype", "target": "asset_types_loadeditabletype", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L104", "weight": 1.0}, {"source": "asset_types_addfielddef", "target": "asset_types_loadeditabletype", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L141", "weight": 1.0}, {"source": "asset_types_addfielddef", "target": "asset_types_normalizefieldkey", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L144", "weight": 1.0}], "raw_calls": [{"caller_nid": "asset_types_slugifytypeslug", "callee": "slice", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L22"}, {"caller_nid": "asset_types_slugifytypeslug", "callee": "replace", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L22"}, {"caller_nid": "asset_types_slugifytypeslug", "callee": "replace", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L22"}, {"caller_nid": "asset_types_slugifytypeslug", "callee": "replace", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L22"}, {"caller_nid": "asset_types_slugifytypeslug", "callee": "normalize", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L22"}, {"caller_nid": "asset_types_slugifytypeslug", "callee": "toLowerCase", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L22"}, {"caller_nid": "asset_types_normalizefieldkey", "callee": "slice", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L33"}, {"caller_nid": "asset_types_normalizefieldkey", "callee": "replace", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L33"}, {"caller_nid": "asset_types_normalizefieldkey", "callee": "replace", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L33"}, {"caller_nid": "asset_types_normalizefieldkey", "callee": "replace", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L33"}, {"caller_nid": "asset_types_normalizefieldkey", "callee": "normalize", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L33"}, {"caller_nid": "asset_types_normalizefieldkey", "callee": "toLowerCase", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L33"}, {"caller_nid": "asset_types_normalizefieldkey", "callee": "replace", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L40"}, {"caller_nid": "asset_types_loadeditabletype", "callee": "limit", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L48"}, {"caller_nid": "asset_types_loadeditabletype", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L48"}, {"caller_nid": "asset_types_loadeditabletype", "callee": "from", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L48"}, {"caller_nid": "asset_types_loadeditabletype", "callee": "select", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L48"}, {"caller_nid": "asset_types_loadeditabletype", "callee": "and", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L51"}, {"caller_nid": "asset_types_loadeditabletype", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L51"}, {"caller_nid": "asset_types_loadeditabletype", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L51"}, {"caller_nid": "asset_types_createcompanyassettype", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L65"}, {"caller_nid": "asset_types_createcompanyassettype", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L67"}, {"caller_nid": "asset_types_createcompanyassettype", "callee": "returning", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L70"}, {"caller_nid": "asset_types_createcompanyassettype", "callee": "values", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L70"}, {"caller_nid": "asset_types_createcompanyassettype", "callee": "insert", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L70"}, {"caller_nid": "asset_types_createcompanyassettype", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L76"}, {"caller_nid": "asset_types_createcompanyassettype", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L77"}, {"caller_nid": "asset_types_updatecompanyassettype", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L90"}, {"caller_nid": "asset_types_updatecompanyassettype", "callee": "set", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L90"}, {"caller_nid": "asset_types_updatecompanyassettype", "callee": "update", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L90"}, {"caller_nid": "asset_types_updatecompanyassettype", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L93"}, {"caller_nid": "asset_types_updatecompanyassettype", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L94"}, {"caller_nid": "asset_types_updatecompanyassettype", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L95"}, {"caller_nid": "asset_types_updatecompanyassettype", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L97"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L107"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "from", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L107"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "select", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L107"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "and", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L111"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L112"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L113"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "isNull", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L114"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L120"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "delete", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L120"}, {"caller_nid": "asset_types_deletecompanyassettype", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L120"}, {"caller_nid": "asset_types_addfielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L144"}, {"caller_nid": "asset_types_addfielddef", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L153"}, {"caller_nid": "asset_types_addfielddef", "callee": "from", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L153"}, {"caller_nid": "asset_types_addfielddef", "callee": "select", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L153"}, {"caller_nid": "asset_types_addfielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L156"}, {"caller_nid": "asset_types_addfielddef", "callee": "returning", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L158"}, {"caller_nid": "asset_types_addfielddef", "callee": "values", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L158"}, {"caller_nid": "asset_types_addfielddef", "callee": "insert", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L158"}, {"caller_nid": "asset_types_addfielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L163"}, {"caller_nid": "asset_types_addfielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L168"}, {"caller_nid": "asset_types_addfielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L169"}, {"caller_nid": "asset_types_addfielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L170"}, {"caller_nid": "asset_types_updatefielddef", "callee": "limit", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L196"}, {"caller_nid": "asset_types_updatefielddef", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L196"}, {"caller_nid": "asset_types_updatefielddef", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L196"}, {"caller_nid": "asset_types_updatefielddef", "callee": "from", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L196"}, {"caller_nid": "asset_types_updatefielddef", "callee": "select", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L196"}, {"caller_nid": "asset_types_updatefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L199"}, {"caller_nid": "asset_types_updatefielddef", "callee": "and", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L200"}, {"caller_nid": "asset_types_updatefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L200"}, {"caller_nid": "asset_types_updatefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L200"}, {"caller_nid": "asset_types_updatefielddef", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L210"}, {"caller_nid": "asset_types_updatefielddef", "callee": "set", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L210"}, {"caller_nid": "asset_types_updatefielddef", "callee": "update", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L210"}, {"caller_nid": "asset_types_updatefielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L213"}, {"caller_nid": "asset_types_updatefielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L217"}, {"caller_nid": "asset_types_updatefielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L218"}, {"caller_nid": "asset_types_updatefielddef", "callee": "trim", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L219"}, {"caller_nid": "asset_types_updatefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L222"}, {"caller_nid": "asset_types_removefielddef", "callee": "limit", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L235"}, {"caller_nid": "asset_types_removefielddef", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L235"}, {"caller_nid": "asset_types_removefielddef", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L235"}, {"caller_nid": "asset_types_removefielddef", "callee": "from", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L235"}, {"caller_nid": "asset_types_removefielddef", "callee": "select", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L235"}, {"caller_nid": "asset_types_removefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L242"}, {"caller_nid": "asset_types_removefielddef", "callee": "and", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L243"}, {"caller_nid": "asset_types_removefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L243"}, {"caller_nid": "asset_types_removefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L243"}, {"caller_nid": "asset_types_removefielddef", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L248"}, {"caller_nid": "asset_types_removefielddef", "callee": "from", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L248"}, {"caller_nid": "asset_types_removefielddef", "callee": "select", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L248"}, {"caller_nid": "asset_types_removefielddef", "callee": "and", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L252"}, {"caller_nid": "asset_types_removefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L253"}, {"caller_nid": "asset_types_removefielddef", "callee": "sql", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L254"}, {"caller_nid": "asset_types_removefielddef", "callee": "isNull", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L255"}, {"caller_nid": "asset_types_removefielddef", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L260"}, {"caller_nid": "asset_types_removefielddef", "callee": "set", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L260"}, {"caller_nid": "asset_types_removefielddef", "callee": "update", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L260"}, {"caller_nid": "asset_types_removefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L263"}, {"caller_nid": "asset_types_removefielddef", "callee": "where", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L267"}, {"caller_nid": "asset_types_removefielddef", "callee": "delete", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L267"}, {"caller_nid": "asset_types_removefielddef", "callee": "eq", "source_file": "src\\lib\\server\\services\\asset-types.ts", "source_location": "L267"}]} \ No newline at end of file diff --git a/graphify-out/cache/af70773f103c99bed756d38394548f4f297a41a065aa89fa780def970a69474d.json b/graphify-out/cache/af70773f103c99bed756d38394548f4f297a41a065aa89fa780def970a69474d.json new file mode 100644 index 0000000..39285dc --- /dev/null +++ b/graphify-out/cache/af70773f103c99bed756d38394548f4f297a41a065aa89fa780def970a69474d.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_new_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\new\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/b0fae1d299fa08419dea5e35c4c2e8b4526c67dd131fdc491a28f5d82327f66c.json b/graphify-out/cache/b0fae1d299fa08419dea5e35c4c2e8b4526c67dd131fdc491a28f5d82327f66c.json new file mode 100644 index 0000000..9be966f --- /dev/null +++ b/graphify-out/cache/b0fae1d299fa08419dea5e35c4c2e8b4526c67dd131fdc491a28f5d82327f66c.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_wiki_ts", "label": "wiki.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L1"}, {"id": "wiki_slugify", "label": "slugify()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L8"}, {"id": "wiki_scopeidmatches", "label": "scopeIdMatches()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L19"}, {"id": "wiki_listpagesforscope", "label": "listPagesForScope()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L23"}, {"id": "wiki_getpagewithcurrentrevision", "label": "getPageWithCurrentRevision()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L47"}, {"id": "wiki_listrevisions", "label": "listRevisions()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L80"}, {"id": "wiki_getrevision", "label": "getRevision()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L102"}, {"id": "wiki_upsertpage", "label": "upsertPage()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L125"}, {"id": "wiki_softdeletepage", "label": "softDeletePage()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L214"}, {"id": "wiki_searchpages", "label": "searchPages()", "file_type": "code", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L225"}], "edges": [{"source": "src_lib_server_services_wiki_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_slugify", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_scopeidmatches", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L19", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_listpagesforscope", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L23", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_getpagewithcurrentrevision", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L47", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_listrevisions", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L80", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_getrevision", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L102", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_upsertpage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L125", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_softdeletepage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L214", "weight": 1.0}, {"source": "src_lib_server_services_wiki_ts", "target": "wiki_searchpages", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L225", "weight": 1.0}, {"source": "wiki_listpagesforscope", "target": "wiki_scopeidmatches", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L40", "weight": 1.0}, {"source": "wiki_getpagewithcurrentrevision", "target": "wiki_scopeidmatches", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L60", "weight": 1.0}, {"source": "wiki_upsertpage", "target": "wiki_slugify", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L135", "weight": 1.0}, {"source": "wiki_searchpages", "target": "wiki_scopeidmatches", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L249", "weight": 1.0}], "raw_calls": [{"caller_nid": "wiki_slugify", "callee": "slice", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L9"}, {"caller_nid": "wiki_slugify", "callee": "replace", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L9"}, {"caller_nid": "wiki_slugify", "callee": "replace", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L9"}, {"caller_nid": "wiki_slugify", "callee": "replace", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L9"}, {"caller_nid": "wiki_slugify", "callee": "normalize", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L9"}, {"caller_nid": "wiki_slugify", "callee": "toLowerCase", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L9"}, {"caller_nid": "wiki_scopeidmatches", "callee": "isNull", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L20"}, {"caller_nid": "wiki_scopeidmatches", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L20"}, {"caller_nid": "wiki_listpagesforscope", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L28"}, {"caller_nid": "wiki_listpagesforscope", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L28"}, {"caller_nid": "wiki_listpagesforscope", "callee": "from", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L28"}, {"caller_nid": "wiki_listpagesforscope", "callee": "select", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L28"}, {"caller_nid": "wiki_listpagesforscope", "callee": "and", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L37"}, {"caller_nid": "wiki_listpagesforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L38"}, {"caller_nid": "wiki_listpagesforscope", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L39"}, {"caller_nid": "wiki_listpagesforscope", "callee": "isNull", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L41"}, {"caller_nid": "wiki_listpagesforscope", "callee": "asc", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L44"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "limit", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L53"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L53"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "from", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L53"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "select", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L53"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "and", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L57"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L58"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L59"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L61"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "isNull", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L62"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "limit", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L67"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L67"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "leftJoin", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L67"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "from", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L67"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "select", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L67"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L73"}, {"caller_nid": "wiki_getpagewithcurrentrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L74"}, {"caller_nid": "wiki_listrevisions", "callee": "limit", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L81"}, {"caller_nid": "wiki_listrevisions", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L81"}, {"caller_nid": "wiki_listrevisions", "callee": "from", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L81"}, {"caller_nid": "wiki_listrevisions", "callee": "select", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L81"}, {"caller_nid": "wiki_listrevisions", "callee": "and", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L84"}, {"caller_nid": "wiki_listrevisions", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L84"}, {"caller_nid": "wiki_listrevisions", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L84"}, {"caller_nid": "wiki_listrevisions", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L87"}, {"caller_nid": "wiki_listrevisions", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L87"}, {"caller_nid": "wiki_listrevisions", "callee": "leftJoin", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L87"}, {"caller_nid": "wiki_listrevisions", "callee": "from", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L87"}, {"caller_nid": "wiki_listrevisions", "callee": "select", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L87"}, {"caller_nid": "wiki_listrevisions", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L97"}, {"caller_nid": "wiki_listrevisions", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L98"}, {"caller_nid": "wiki_listrevisions", "callee": "desc", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L99"}, {"caller_nid": "wiki_getrevision", "callee": "limit", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L103"}, {"caller_nid": "wiki_getrevision", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L103"}, {"caller_nid": "wiki_getrevision", "callee": "from", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L103"}, {"caller_nid": "wiki_getrevision", "callee": "select", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L103"}, {"caller_nid": "wiki_getrevision", "callee": "and", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L106"}, {"caller_nid": "wiki_getrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L106"}, {"caller_nid": "wiki_getrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L106"}, {"caller_nid": "wiki_getrevision", "callee": "limit", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L109"}, {"caller_nid": "wiki_getrevision", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L109"}, {"caller_nid": "wiki_getrevision", "callee": "leftJoin", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L109"}, {"caller_nid": "wiki_getrevision", "callee": "from", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L109"}, {"caller_nid": "wiki_getrevision", "callee": "select", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L109"}, {"caller_nid": "wiki_getrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L115"}, {"caller_nid": "wiki_getrevision", "callee": "and", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L116"}, {"caller_nid": "wiki_getrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L116"}, {"caller_nid": "wiki_getrevision", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L116"}, {"caller_nid": "wiki_upsertpage", "callee": "transaction", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L138"}, {"caller_nid": "wiki_softdeletepage", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L215"}, {"caller_nid": "wiki_softdeletepage", "callee": "set", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L215"}, {"caller_nid": "wiki_softdeletepage", "callee": "update", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L215"}, {"caller_nid": "wiki_softdeletepage", "callee": "and", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L218"}, {"caller_nid": "wiki_softdeletepage", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L218"}, {"caller_nid": "wiki_softdeletepage", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L218"}, {"caller_nid": "wiki_searchpages", "callee": "trim", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L232"}, {"caller_nid": "wiki_searchpages", "callee": "limit", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L236"}, {"caller_nid": "wiki_searchpages", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L236"}, {"caller_nid": "wiki_searchpages", "callee": "where", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L236"}, {"caller_nid": "wiki_searchpages", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L236"}, {"caller_nid": "wiki_searchpages", "callee": "from", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L236"}, {"caller_nid": "wiki_searchpages", "callee": "select", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L236"}, {"caller_nid": "wiki_searchpages", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L244"}, {"caller_nid": "wiki_searchpages", "callee": "and", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L246"}, {"caller_nid": "wiki_searchpages", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L247"}, {"caller_nid": "wiki_searchpages", "callee": "eq", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L248"}, {"caller_nid": "wiki_searchpages", "callee": "isNull", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L250"}, {"caller_nid": "wiki_searchpages", "callee": "sql", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L251"}, {"caller_nid": "wiki_searchpages", "callee": "desc", "source_file": "src\\lib\\server\\services\\wiki.ts", "source_location": "L254"}]} \ No newline at end of file diff --git a/graphify-out/cache/b1684355135ed7dfb4f85219e37ea5178387f1075875f4bcb6bc542bd7600b24.json b/graphify-out/cache/b1684355135ed7dfb4f85219e37ea5178387f1075875f4bcb6bc542bd7600b24.json new file mode 100644 index 0000000..079518f --- /dev/null +++ b/graphify-out/cache/b1684355135ed7dfb4f85219e37ea5178387f1075875f4bcb6bc542bd7600b24.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_notifications_ts", "label": "notifications.ts", "file_type": "code", "source_file": "src\\lib\\notifications.ts", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/b2ed6b30ecfe289acef0da44b467d11ea796054777ef15e23570ef3ed06bd655.json b/graphify-out/cache/b2ed6b30ecfe289acef0da44b467d11ea796054777ef15e23570ef3ed06bd655.json new file mode 100644 index 0000000..f38e037 --- /dev/null +++ b/graphify-out/cache/b2ed6b30ecfe289acef0da44b467d11ea796054777ef15e23570ef3ed06bd655.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_company_new_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/b357bba2ae75316ee4207c017fed72253ecf2f205e7f1643f379a99280bb9bc3.json b/graphify-out/cache/b357bba2ae75316ee4207c017fed72253ecf2f205e7f1643f379a99280bb9bc3.json new file mode 100644 index 0000000..7848517 --- /dev/null +++ b/graphify-out/cache/b357bba2ae75316ee4207c017fed72253ecf2f205e7f1643f379a99280bb9bc3.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_logs_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L9"}], "edges": [{"source": "src_routes_app_assets_id_logs_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_logs_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_logs_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_id_logs_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_id_logs_page_server_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_assets_id_logs_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_id_logs_page_server_ts", "target": "src_routes_app_assets_id_logs_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_assets_id_logs_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L9", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L10"}, {"caller_nid": "page_server_load", "callee": "limit", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L19"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L20"}, {"caller_nid": "page_server_load", "callee": "desc", "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", "source_location": "L21"}]} \ No newline at end of file diff --git a/graphify-out/cache/b4722dfb4b38664a7295e1803ea67e1d1b5b8fc99725d87015d0dad11ad81c17.json b/graphify-out/cache/b4722dfb4b38664a7295e1803ea67e1d1b5b8fc99725d87015d0dad11ad81c17.json new file mode 100644 index 0000000..d82bfcc --- /dev/null +++ b/graphify-out/cache/b4722dfb4b38664a7295e1803ea67e1d1b5b8fc99725d87015d0dad11ad81c17.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_new_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\new\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/b4d2d1aaa9c6cef4b30242646837e1d011527627d81dfef1fd29e41c1715c539.json b/graphify-out/cache/b4d2d1aaa9c6cef4b30242646837e1d011527627d81dfef1fd29e41c1715c539.json new file mode 100644 index 0000000..02d382c --- /dev/null +++ b/graphify-out/cache/b4d2d1aaa9c6cef4b30242646837e1d011527627d81dfef1fd29e41c1715c539.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_maintenance_ts", "label": "maintenance.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\maintenance.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_maintenance_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\maintenance.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_maintenance_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\maintenance.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_maintenance_ts", "target": "src_lib_server_db_schema_assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\maintenance.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_db_schema_maintenance_ts", "target": "src_lib_server_db_schema_checklists", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\maintenance.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_db_schema_maintenance_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\maintenance.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/b4f6bfce25e9f01035ddc4dc61664d8631d2de9776ce12e509517b93ece0819a.json b/graphify-out/cache/b4f6bfce25e9f01035ddc4dc61664d8631d2de9776ce12e509517b93ece0819a.json new file mode 100644 index 0000000..59fe7d3 --- /dev/null +++ b/graphify-out/cache/b4f6bfce25e9f01035ddc4dc61664d8631d2de9776ce12e509517b93ece0819a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_maintenance_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/b728211eb724b78e7d7b27ee78b21c1ba4c0d01386a96979c630e97f5344b486.json b/graphify-out/cache/b728211eb724b78e7d7b27ee78b21c1ba4c0d01386a96979c630e97f5344b486.json new file mode 100644 index 0000000..5c22546 --- /dev/null +++ b/graphify-out/cache/b728211eb724b78e7d7b27ee78b21c1ba4c0d01386a96979c630e97f5344b486.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_new_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\new\\+page.server.ts", "source_location": "L1"}], "edges": [{"source": "src_routes_app_wiki_new_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\new\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_wiki_new_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\new\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_wiki_new_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\new\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_wiki_new_page_server_ts", "target": "src_routes_app_wiki_new_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\new\\+page.server.ts", "source_location": "L4", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/b7691996e299d8fd6b5f0b3e0da1996eaebb4fffe38aa830e80eaeadfcc0afd3.json b/graphify-out/cache/b7691996e299d8fd6b5f0b3e0da1996eaebb4fffe38aa830e80eaeadfcc0afd3.json new file mode 100644 index 0000000..5ab834c --- /dev/null +++ b/graphify-out/cache/b7691996e299d8fd6b5f0b3e0da1996eaebb4fffe38aa830e80eaeadfcc0afd3.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_slug_history_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_wiki_slug_history_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_history_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_history_page_server_ts", "target": "src_routes_app_wiki_slug_history_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_history_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "getPageWithCurrentRevision", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "listRevisions", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L9"}]} \ No newline at end of file diff --git a/graphify-out/cache/b79f05399236cfd6e4e88a790ca696e94c23328d495742df042c1d953e5e451c.json b/graphify-out/cache/b79f05399236cfd6e4e88a790ca696e94c23328d495742df042c1d953e5e451c.json new file mode 100644 index 0000000..5623dea --- /dev/null +++ b/graphify-out/cache/b79f05399236cfd6e4e88a790ca696e94c23328d495742df042c1d953e5e451c.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_asset_types_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/b9457e4203748c41e7dd066d8eb1431fba9f06336a74ca2cd0e3add38ae5c9ba.json b/graphify-out/cache/b9457e4203748c41e7dd066d8eb1431fba9f06336a74ca2cd0e3add38ae5c9ba.json new file mode 100644 index 0000000..bf8dcf2 --- /dev/null +++ b/graphify-out/cache/b9457e4203748c41e7dd066d8eb1431fba9f06336a74ca2cd0e3add38ae5c9ba.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_properties_ts", "label": "properties.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\properties.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_properties_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\properties.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_properties_ts", "target": "src_lib_server_db_schema_tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\properties.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_properties_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\properties.ts", "source_location": "L3", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/bb827f4c9d0797c4b82e21610fa375dd7a3eeff85a0ec4bb7fb3000775362606.json b/graphify-out/cache/bb827f4c9d0797c4b82e21610fa375dd7a3eeff85a0ec4bb7fb3000775362606.json new file mode 100644 index 0000000..7e5658e --- /dev/null +++ b/graphify-out/cache/bb827f4c9d0797c4b82e21610fa375dd7a3eeff85a0ec4bb7fb3000775362606.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_projects_id_wiki_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_page_server_ts", "target": "src_routes_app_projects_id_wiki_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "trim", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "get", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "searchPages", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "listPagesForScope", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", "source_location": "L16"}]} \ No newline at end of file diff --git a/graphify-out/cache/bbd6fde02d4134446fafe39317797f27b8dc2bfbaf41455b13f82e58ed6d7b4e.json b/graphify-out/cache/bbd6fde02d4134446fafe39317797f27b8dc2bfbaf41455b13f82e58ed6d7b4e.json new file mode 100644 index 0000000..c3466e3 --- /dev/null +++ b/graphify-out/cache/bbd6fde02d4134446fafe39317797f27b8dc2bfbaf41455b13f82e58ed6d7b4e.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_asset_types_id_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L14"}, {"id": "page_server_parseenumvalues", "label": "parseEnumValues()", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L69"}], "edges": [{"source": "src_routes_app_admin_asset_types_id_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_id_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_id_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_id_page_server_ts", "target": "asset_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_id_page_server_ts", "target": "src_routes_app_admin_asset_types_id_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L12", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_id_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L14", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_id_page_server_ts", "target": "page_server_parseenumvalues", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L69", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "loadTypeWithFields", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L16"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L20"}, {"caller_nid": "page_server_parseenumvalues", "callee": "filter", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L71"}, {"caller_nid": "page_server_parseenumvalues", "callee": "map", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L71"}, {"caller_nid": "page_server_parseenumvalues", "callee": "split", "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", "source_location": "L71"}]} \ No newline at end of file diff --git a/graphify-out/cache/bcd7b3330940c2ed4fc988553bf6bbb1db49fc0c94d8320719cc7d9073451d73.json b/graphify-out/cache/bcd7b3330940c2ed4fc988553bf6bbb1db49fc0c94d8320719cc7d9073451d73.json new file mode 100644 index 0000000..e9f4a9c --- /dev/null +++ b/graphify-out/cache/bcd7b3330940c2ed4fc988553bf6bbb1db49fc0c94d8320719cc7d9073451d73.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_decisions_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_projects_id_decisions_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_page_server_ts", "target": "decisions", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_page_server_ts", "target": "src_routes_app_projects_id_decisions_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "listDecisionsForScope", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", "source_location": "L8"}]} \ No newline at end of file diff --git a/graphify-out/cache/c1567f0a8b44ab6acc8a5057ad71fa31a6ca5d1810b754a6e5338f5808ffa5aa.json b/graphify-out/cache/c1567f0a8b44ab6acc8a5057ad71fa31a6ca5d1810b754a6e5338f5808ffa5aa.json new file mode 100644 index 0000000..157f430 --- /dev/null +++ b/graphify-out/cache/c1567f0a8b44ab6acc8a5057ad71fa31a6ca5d1810b754a6e5338f5808ffa5aa.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_work_wpid_taskid_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/c2d0a314cb811627e063bdeb0de099cdf0d99ac0e3fa97efcfd07b3927c5983c.json b/graphify-out/cache/c2d0a314cb811627e063bdeb0de099cdf0d99ac0e3fa97efcfd07b3927c5983c.json new file mode 100644 index 0000000..9a6ad5c --- /dev/null +++ b/graphify-out/cache/c2d0a314cb811627e063bdeb0de099cdf0d99ac0e3fa97efcfd07b3927c5983c.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_layout_server_ts", "label": "+layout.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L1"}, {"id": "layout_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_projects_id_layout_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_layout_server_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_layout_server_ts", "target": "src_routes_app_projects_id_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_layout_server_ts", "target": "layout_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "layout_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L6"}, {"caller_nid": "layout_server_load", "callee": "getProject", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L7"}, {"caller_nid": "layout_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", "source_location": "L8"}]} \ No newline at end of file diff --git a/graphify-out/cache/c5a2966790c684c2ccffa84248d2ece08e2eae7e69d9d9f3d0fd6252b1d330ba.json b/graphify-out/cache/c5a2966790c684c2ccffa84248d2ece08e2eae7e69d9d9f3d0fd6252b1d330ba.json new file mode 100644 index 0000000..e281f86 --- /dev/null +++ b/graphify-out/cache/c5a2966790c684c2ccffa84248d2ece08e2eae7e69d9d9f3d0fd6252b1d330ba.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_custom_fields_form_ts", "label": "custom-fields-form.ts", "file_type": "code", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L1"}, {"id": "custom_fields_form_gathercustomfieldsfromform", "label": "gatherCustomFieldsFromForm()", "file_type": "code", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L8"}], "edges": [{"source": "src_lib_server_custom_fields_form_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_custom_fields_form_ts", "target": "custom_fields_form_gathercustomfieldsfromform", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L8", "weight": 1.0}], "raw_calls": [{"caller_nid": "custom_fields_form_gathercustomfieldsfromform", "callee": "filter", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L18"}, {"caller_nid": "custom_fields_form_gathercustomfieldsfromform", "callee": "map", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L18"}, {"caller_nid": "custom_fields_form_gathercustomfieldsfromform", "callee": "getAll", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L18"}, {"caller_nid": "custom_fields_form_gathercustomfieldsfromform", "callee": "get", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L23"}, {"caller_nid": "custom_fields_form_gathercustomfieldsfromform", "callee": "get", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L28"}, {"caller_nid": "custom_fields_form_gathercustomfieldsfromform", "callee": "trim", "source_file": "src\\lib\\server\\custom-fields-form.ts", "source_location": "L30"}]} \ No newline at end of file diff --git a/graphify-out/cache/c7132aa357688d59e1df31b3bc16d6717995e1e5605d2483c763d327534c7dd0.json b/graphify-out/cache/c7132aa357688d59e1df31b3bc16d6717995e1e5605d2483c763d327534c7dd0.json new file mode 100644 index 0000000..b9700d7 --- /dev/null +++ b/graphify-out/cache/c7132aa357688d59e1df31b3bc16d6717995e1e5605d2483c763d327534c7dd0.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_maintenance_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_maintenance_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_maintenance_page_server_ts", "target": "maintenance", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_maintenance_page_server_ts", "target": "src_routes_app_maintenance_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_maintenance_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "listDueAndOverdue", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "now", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "filter", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "filter", "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", "source_location": "L14"}]} \ No newline at end of file diff --git a/graphify-out/cache/c8a6d61d5867b3f1d339626dc8a3e3c460dabf21cae00f19189b147688f32136.json b/graphify-out/cache/c8a6d61d5867b3f1d339626dc8a3e3c460dabf21cae00f19189b147688f32136.json new file mode 100644 index 0000000..f11bd64 --- /dev/null +++ b/graphify-out/cache/c8a6d61d5867b3f1d339626dc8a3e3c460dabf21cae00f19189b147688f32136.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_utils_email_ts", "label": "email.ts", "file_type": "code", "source_file": "src\\lib\\utils\\email.ts", "source_location": "L1"}, {"id": "email_normalizeemail", "label": "normalizeEmail()", "file_type": "code", "source_file": "src\\lib\\utils\\email.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_utils_email_ts", "target": "email_normalizeemail", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\utils\\email.ts", "source_location": "L1", "weight": 1.0}], "raw_calls": [{"caller_nid": "email_normalizeemail", "callee": "toLowerCase", "source_file": "src\\lib\\utils\\email.ts", "source_location": "L2"}, {"caller_nid": "email_normalizeemail", "callee": "trim", "source_file": "src\\lib\\utils\\email.ts", "source_location": "L2"}, {"caller_nid": "email_normalizeemail", "callee": "normalize", "source_file": "src\\lib\\utils\\email.ts", "source_location": "L2"}]} \ No newline at end of file diff --git a/graphify-out/cache/c8b26eea87c9b5cbf8d5f3fff8e061c375042c1d83fc03fb60beb10771f62d9b.json b/graphify-out/cache/c8b26eea87c9b5cbf8d5f3fff8e061c375042c1d83fc03fb60beb10771f62d9b.json new file mode 100644 index 0000000..807d5bf --- /dev/null +++ b/graphify-out/cache/c8b26eea87c9b5cbf8d5f3fff8e061c375042c1d83fc03fb60beb10771f62d9b.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_rooms_ts", "label": "rooms.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L1"}, {"id": "rooms_assertproperty", "label": "assertProperty()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L12"}, {"id": "rooms_listfloors", "label": "listFloors()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L29"}, {"id": "rooms_createfloor", "label": "createFloor()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L38"}, {"id": "rooms_updatefloor", "label": "updateFloor()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L63"}, {"id": "rooms_deletefloor", "label": "deleteFloor()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L85"}, {"id": "rooms_listroomswithcounts", "label": "listRoomsWithCounts()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L99"}, {"id": "rooms_getroom", "label": "getRoom()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L129"}, {"id": "rooms_createroom", "label": "createRoom()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L145"}, {"id": "rooms_updateroom", "label": "updateRoom()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L188"}, {"id": "rooms_softdeleteroom", "label": "softDeleteRoom()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L217"}, {"id": "rooms_assertroominproperty", "label": "assertRoomInProperty()", "file_type": "code", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L239"}], "edges": [{"source": "src_lib_server_services_rooms_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L10", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_assertproperty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L12", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_listfloors", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L29", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_createfloor", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L38", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_updatefloor", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L63", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_deletefloor", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L85", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_listroomswithcounts", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L99", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_getroom", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L129", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_createroom", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L145", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_updateroom", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L188", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_softdeleteroom", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L217", "weight": 1.0}, {"source": "src_lib_server_services_rooms_ts", "target": "rooms_assertroominproperty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L239", "weight": 1.0}, {"source": "rooms_listfloors", "target": "rooms_assertproperty", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L30", "weight": 1.0}, {"source": "rooms_createfloor", "target": "rooms_assertproperty", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L44", "weight": 1.0}, {"source": "rooms_listroomswithcounts", "target": "rooms_assertproperty", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L100", "weight": 1.0}, {"source": "rooms_createroom", "target": "rooms_assertproperty", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L152", "weight": 1.0}, {"source": "rooms_updateroom", "target": "rooms_getroom", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L193", "weight": 1.0}, {"source": "rooms_softdeleteroom", "target": "rooms_getroom", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L218", "weight": 1.0}], "raw_calls": [{"caller_nid": "rooms_assertproperty", "callee": "limit", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L13"}, {"caller_nid": "rooms_assertproperty", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L13"}, {"caller_nid": "rooms_assertproperty", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L13"}, {"caller_nid": "rooms_assertproperty", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L13"}, {"caller_nid": "rooms_assertproperty", "callee": "and", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L17"}, {"caller_nid": "rooms_assertproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L18"}, {"caller_nid": "rooms_assertproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L19"}, {"caller_nid": "rooms_assertproperty", "callee": "isNull", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L20"}, {"caller_nid": "rooms_listfloors", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L31"}, {"caller_nid": "rooms_listfloors", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L31"}, {"caller_nid": "rooms_listfloors", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L31"}, {"caller_nid": "rooms_listfloors", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L31"}, {"caller_nid": "rooms_listfloors", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L34"}, {"caller_nid": "rooms_listfloors", "callee": "asc", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L35"}, {"caller_nid": "rooms_listfloors", "callee": "asc", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L35"}, {"caller_nid": "rooms_createfloor", "callee": "trim", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L45"}, {"caller_nid": "rooms_createfloor", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L47"}, {"caller_nid": "rooms_createfloor", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L47"}, {"caller_nid": "rooms_createfloor", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L47"}, {"caller_nid": "rooms_createfloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L50"}, {"caller_nid": "rooms_createfloor", "callee": "returning", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L51"}, {"caller_nid": "rooms_createfloor", "callee": "values", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L51"}, {"caller_nid": "rooms_createfloor", "callee": "insert", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L51"}, {"caller_nid": "rooms_createfloor", "callee": "trim", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L56"}, {"caller_nid": "rooms_updatefloor", "callee": "limit", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L69"}, {"caller_nid": "rooms_updatefloor", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L69"}, {"caller_nid": "rooms_updatefloor", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L69"}, {"caller_nid": "rooms_updatefloor", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L69"}, {"caller_nid": "rooms_updatefloor", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L69"}, {"caller_nid": "rooms_updatefloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L72"}, {"caller_nid": "rooms_updatefloor", "callee": "and", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L73"}, {"caller_nid": "rooms_updatefloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L73"}, {"caller_nid": "rooms_updatefloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L73"}, {"caller_nid": "rooms_updatefloor", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L76"}, {"caller_nid": "rooms_updatefloor", "callee": "set", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L76"}, {"caller_nid": "rooms_updatefloor", "callee": "update", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L76"}, {"caller_nid": "rooms_updatefloor", "callee": "trim", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L79"}, {"caller_nid": "rooms_updatefloor", "callee": "trim", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L80"}, {"caller_nid": "rooms_updatefloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L82"}, {"caller_nid": "rooms_deletefloor", "callee": "limit", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L87"}, {"caller_nid": "rooms_deletefloor", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L87"}, {"caller_nid": "rooms_deletefloor", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L87"}, {"caller_nid": "rooms_deletefloor", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L87"}, {"caller_nid": "rooms_deletefloor", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L87"}, {"caller_nid": "rooms_deletefloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L90"}, {"caller_nid": "rooms_deletefloor", "callee": "and", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L91"}, {"caller_nid": "rooms_deletefloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L91"}, {"caller_nid": "rooms_deletefloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L91"}, {"caller_nid": "rooms_deletefloor", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L94"}, {"caller_nid": "rooms_deletefloor", "callee": "delete", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L94"}, {"caller_nid": "rooms_deletefloor", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L94"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L101"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L101"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "leftJoin", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L101"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L101"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L101"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L119"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "and", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L120"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L120"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "isNull", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L120"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "asc", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L122"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "asc", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L123"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "asc", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L124"}, {"caller_nid": "rooms_listroomswithcounts", "callee": "asc", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L125"}, {"caller_nid": "rooms_getroom", "callee": "limit", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L130"}, {"caller_nid": "rooms_getroom", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L130"}, {"caller_nid": "rooms_getroom", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L130"}, {"caller_nid": "rooms_getroom", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L130"}, {"caller_nid": "rooms_getroom", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L130"}, {"caller_nid": "rooms_getroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L133"}, {"caller_nid": "rooms_getroom", "callee": "and", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L135"}, {"caller_nid": "rooms_getroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L136"}, {"caller_nid": "rooms_getroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L137"}, {"caller_nid": "rooms_getroom", "callee": "isNull", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L138"}, {"caller_nid": "rooms_createroom", "callee": "trim", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L153"}, {"caller_nid": "rooms_createroom", "callee": "limit", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L157"}, {"caller_nid": "rooms_createroom", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L157"}, {"caller_nid": "rooms_createroom", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L157"}, {"caller_nid": "rooms_createroom", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L157"}, {"caller_nid": "rooms_createroom", "callee": "and", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L161"}, {"caller_nid": "rooms_createroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L162"}, {"caller_nid": "rooms_createroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L163"}, {"caller_nid": "rooms_createroom", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L170"}, {"caller_nid": "rooms_createroom", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L170"}, {"caller_nid": "rooms_createroom", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L170"}, {"caller_nid": "rooms_createroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L173"}, {"caller_nid": "rooms_createroom", "callee": "returning", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L175"}, {"caller_nid": "rooms_createroom", "callee": "values", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L175"}, {"caller_nid": "rooms_createroom", "callee": "insert", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L175"}, {"caller_nid": "rooms_createroom", "callee": "trim", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L181"}, {"caller_nid": "rooms_updateroom", "callee": "limit", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L197"}, {"caller_nid": "rooms_updateroom", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L197"}, {"caller_nid": "rooms_updateroom", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L197"}, {"caller_nid": "rooms_updateroom", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L197"}, {"caller_nid": "rooms_updateroom", "callee": "and", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L201"}, {"caller_nid": "rooms_updateroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L201"}, {"caller_nid": "rooms_updateroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L201"}, {"caller_nid": "rooms_updateroom", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L207"}, {"caller_nid": "rooms_updateroom", "callee": "set", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L207"}, {"caller_nid": "rooms_updateroom", "callee": "update", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L207"}, {"caller_nid": "rooms_updateroom", "callee": "trim", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L210"}, {"caller_nid": "rooms_updateroom", "callee": "trim", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L211"}, {"caller_nid": "rooms_updateroom", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L214"}, {"caller_nid": "rooms_softdeleteroom", "callee": "transaction", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L223"}, {"caller_nid": "rooms_assertroominproperty", "callee": "limit", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L244"}, {"caller_nid": "rooms_assertroominproperty", "callee": "where", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L244"}, {"caller_nid": "rooms_assertroominproperty", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L244"}, {"caller_nid": "rooms_assertroominproperty", "callee": "from", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L244"}, {"caller_nid": "rooms_assertroominproperty", "callee": "select", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L244"}, {"caller_nid": "rooms_assertroominproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L247"}, {"caller_nid": "rooms_assertroominproperty", "callee": "and", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L249"}, {"caller_nid": "rooms_assertroominproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L250"}, {"caller_nid": "rooms_assertroominproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L251"}, {"caller_nid": "rooms_assertroominproperty", "callee": "eq", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L252"}, {"caller_nid": "rooms_assertroominproperty", "callee": "isNull", "source_file": "src\\lib\\server\\services\\rooms.ts", "source_location": "L253"}]} \ No newline at end of file diff --git a/graphify-out/cache/c918363f4c147df80e03b1c72bade533a246b4dfc620dade6923dd71b451450b.json b/graphify-out/cache/c918363f4c147df80e03b1c72bade533a246b4dfc620dade6923dd71b451450b.json new file mode 100644 index 0000000..5544ee4 --- /dev/null +++ b/graphify-out/cache/c918363f4c147df80e03b1c72bade533a246b4dfc620dade6923dd71b451450b.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_notifications_ts", "label": "notifications.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L1"}, {"id": "notifications_parsesettings", "label": "parseSettings()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L31"}, {"id": "notifications_absolutelink", "label": "absoluteLink()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L40"}, {"id": "notifications_notify", "label": "notify()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L51"}, {"id": "notifications_fanoutexternal", "label": "fanOutExternal()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L70"}, {"id": "notifications_renderemailhtml", "label": "renderEmailHtml()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L125"}, {"id": "notifications_unreadcountforuser", "label": "unreadCountForUser()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L144"}, {"id": "notifications_listforuser", "label": "listForUser()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L161"}, {"id": "notifications_markread", "label": "markRead()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L176"}, {"id": "notifications_markallread", "label": "markAllRead()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L190"}, {"id": "notifications_updateuserprefs", "label": "updateUserPrefs()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L211"}, {"id": "notifications_getuserprefs", "label": "getUserPrefs()", "file_type": "code", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L229"}], "edges": [{"source": "src_lib_server_services_notifications_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "env", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "tenancy", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "email", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "matrix", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_parsesettings", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L31", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_absolutelink", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L40", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_notify", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L51", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_fanoutexternal", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L70", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_renderemailhtml", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L125", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_unreadcountforuser", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L144", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_listforuser", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L161", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_markread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L176", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_markallread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L190", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_updateuserprefs", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L211", "weight": 1.0}, {"source": "src_lib_server_services_notifications_ts", "target": "notifications_getuserprefs", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L229", "weight": 1.0}, {"source": "notifications_notify", "target": "notifications_fanoutexternal", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L65", "weight": 1.0}, {"source": "notifications_fanoutexternal", "target": "notifications_absolutelink", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L85", "weight": 1.0}, {"source": "notifications_fanoutexternal", "target": "notifications_parsesettings", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L111", "weight": 1.0}], "raw_calls": [{"caller_nid": "notifications_parsesettings", "callee": "parse", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L34"}, {"caller_nid": "notifications_absolutelink", "callee": "test", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L42"}, {"caller_nid": "notifications_absolutelink", "callee": "replace", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L43"}, {"caller_nid": "notifications_absolutelink", "callee": "startsWith", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L43"}, {"caller_nid": "notifications_notify", "callee": "map", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L54"}, {"caller_nid": "notifications_notify", "callee": "values", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L62"}, {"caller_nid": "notifications_notify", "callee": "insert", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L62"}, {"caller_nid": "notifications_notify", "callee": "catch", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L65"}, {"caller_nid": "notifications_fanoutexternal", "callee": "isEmailConfigured", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L71"}, {"caller_nid": "notifications_fanoutexternal", "callee": "isMatrixConfigured", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L71"}, {"caller_nid": "notifications_fanoutexternal", "callee": "where", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L73"}, {"caller_nid": "notifications_fanoutexternal", "callee": "from", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L73"}, {"caller_nid": "notifications_fanoutexternal", "callee": "select", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L73"}, {"caller_nid": "notifications_fanoutexternal", "callee": "and", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L83"}, {"caller_nid": "notifications_fanoutexternal", "callee": "inArray", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L83"}, {"caller_nid": "notifications_fanoutexternal", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L83"}, {"caller_nid": "notifications_fanoutexternal", "callee": "isEmailConfigured", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L89"}, {"caller_nid": "notifications_fanoutexternal", "callee": "all", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L90"}, {"caller_nid": "notifications_fanoutexternal", "callee": "map", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L91"}, {"caller_nid": "notifications_fanoutexternal", "callee": "filter", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L91"}, {"caller_nid": "notifications_fanoutexternal", "callee": "isMatrixConfigured", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L105"}, {"caller_nid": "notifications_fanoutexternal", "callee": "limit", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L106"}, {"caller_nid": "notifications_fanoutexternal", "callee": "where", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L106"}, {"caller_nid": "notifications_fanoutexternal", "callee": "from", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L106"}, {"caller_nid": "notifications_fanoutexternal", "callee": "select", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L106"}, {"caller_nid": "notifications_fanoutexternal", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L109"}, {"caller_nid": "notifications_fanoutexternal", "callee": "map", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L113"}, {"caller_nid": "notifications_fanoutexternal", "callee": "filter", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L113"}, {"caller_nid": "notifications_fanoutexternal", "callee": "sendMatrixMessage", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L116"}, {"caller_nid": "notifications_renderemailhtml", "callee": "join", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L131"}, {"caller_nid": "notifications_renderemailhtml", "callee": "esc", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L133"}, {"caller_nid": "notifications_renderemailhtml", "callee": "esc", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L134"}, {"caller_nid": "notifications_renderemailhtml", "callee": "esc", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L136"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "where", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L148"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "from", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L148"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "select", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L148"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "count", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L149"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "and", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L152"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L153"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L154"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "isNull", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L155"}, {"caller_nid": "notifications_unreadcountforuser", "callee": "Number", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L158"}, {"caller_nid": "notifications_listforuser", "callee": "limit", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L166"}, {"caller_nid": "notifications_listforuser", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L166"}, {"caller_nid": "notifications_listforuser", "callee": "where", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L166"}, {"caller_nid": "notifications_listforuser", "callee": "from", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L166"}, {"caller_nid": "notifications_listforuser", "callee": "select", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L166"}, {"caller_nid": "notifications_listforuser", "callee": "and", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L170"}, {"caller_nid": "notifications_listforuser", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L170"}, {"caller_nid": "notifications_listforuser", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L170"}, {"caller_nid": "notifications_listforuser", "callee": "desc", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L172"}, {"caller_nid": "notifications_markread", "callee": "where", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L178"}, {"caller_nid": "notifications_markread", "callee": "set", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L178"}, {"caller_nid": "notifications_markread", "callee": "update", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L178"}, {"caller_nid": "notifications_markread", "callee": "sql", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L180"}, {"caller_nid": "notifications_markread", "callee": "and", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L182"}, {"caller_nid": "notifications_markread", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L183"}, {"caller_nid": "notifications_markread", "callee": "inArray", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L184"}, {"caller_nid": "notifications_markread", "callee": "isNull", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L185"}, {"caller_nid": "notifications_markallread", "callee": "where", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L191"}, {"caller_nid": "notifications_markallread", "callee": "set", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L191"}, {"caller_nid": "notifications_markallread", "callee": "update", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L191"}, {"caller_nid": "notifications_markallread", "callee": "sql", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L193"}, {"caller_nid": "notifications_markallread", "callee": "and", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L195"}, {"caller_nid": "notifications_markallread", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L196"}, {"caller_nid": "notifications_markallread", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L197"}, {"caller_nid": "notifications_markallread", "callee": "isNull", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L198"}, {"caller_nid": "notifications_updateuserprefs", "callee": "trim", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L219"}, {"caller_nid": "notifications_updateuserprefs", "callee": "test", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L220"}, {"caller_nid": "notifications_updateuserprefs", "callee": "keys", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L225"}, {"caller_nid": "notifications_updateuserprefs", "callee": "where", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L226"}, {"caller_nid": "notifications_updateuserprefs", "callee": "set", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L226"}, {"caller_nid": "notifications_updateuserprefs", "callee": "update", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L226"}, {"caller_nid": "notifications_updateuserprefs", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L226"}, {"caller_nid": "notifications_getuserprefs", "callee": "limit", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L235"}, {"caller_nid": "notifications_getuserprefs", "callee": "where", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L235"}, {"caller_nid": "notifications_getuserprefs", "callee": "from", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L235"}, {"caller_nid": "notifications_getuserprefs", "callee": "select", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L235"}, {"caller_nid": "notifications_getuserprefs", "callee": "eq", "source_file": "src\\lib\\server\\services\\notifications.ts", "source_location": "L243"}]} \ No newline at end of file diff --git a/graphify-out/cache/c99a0dc3a0e01e73ad5296461550bd8cbfbe2b3872178d2e80b56e7e535dad74.json b/graphify-out/cache/c99a0dc3a0e01e73ad5296461550bd8cbfbe2b3872178d2e80b56e7e535dad74.json new file mode 100644 index 0000000..f8a279f --- /dev/null +++ b/graphify-out/cache/c99a0dc3a0e01e73ad5296461550bd8cbfbe2b3872178d2e80b56e7e535dad74.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_maintenance_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\maintenance\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/c9ed98af9a3170305f4acd78f5f84655240e95037e05410d188a6ea065d320d5.json b/graphify-out/cache/c9ed98af9a3170305f4acd78f5f84655240e95037e05410d188a6ea065d320d5.json new file mode 100644 index 0000000..55bc14f --- /dev/null +++ b/graphify-out/cache/c9ed98af9a3170305f4acd78f5f84655240e95037e05410d188a6ea065d320d5.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_documents_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/ceb1db7e808213113ee1e4d78421f22135e7de523cdf0aa044bfc7940dfa2bcf.json b/graphify-out/cache/ceb1db7e808213113ee1e4d78421f22135e7de523cdf0aa044bfc7940dfa2bcf.json new file mode 100644 index 0000000..035df8a --- /dev/null +++ b/graphify-out/cache/ceb1db7e808213113ee1e4d78421f22135e7de523cdf0aa044bfc7940dfa2bcf.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_checklists_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_checklists_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_checklists_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_checklists_page_server_ts", "target": "checklists", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_checklists_page_server_ts", "target": "src_routes_app_checklists_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_checklists_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "listTemplates", "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", "source_location": "L8"}]} \ No newline at end of file diff --git a/graphify-out/cache/cec8c277a8ae697890f65f12f6e70bcef13a09316d6ff62d523095c67b2ba111.json b/graphify-out/cache/cec8c277a8ae697890f65f12f6e70bcef13a09316d6ff62d523095c67b2ba111.json new file mode 100644 index 0000000..2688d29 --- /dev/null +++ b/graphify-out/cache/cec8c277a8ae697890f65f12f6e70bcef13a09316d6ff62d523095c67b2ba111.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L14"}], "edges": [{"source": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", "target": "tasks", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", "target": "src_routes_app_projects_id_work_wpid_taskid_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L12", "weight": 1.0}, {"source": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L14", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "getTaskWithSubtasks", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L16"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", "source_location": "L17"}]} \ No newline at end of file diff --git a/graphify-out/cache/d0339fdb3eb6485c073dc111b2a4ddc7902fbb27e3b09c5efd28cf7f5a0047c2.json b/graphify-out/cache/d0339fdb3eb6485c073dc111b2a4ddc7902fbb27e3b09c5efd28cf7f5a0047c2.json new file mode 100644 index 0000000..73e3db7 --- /dev/null +++ b/graphify-out/cache/d0339fdb3eb6485c073dc111b2a4ddc7902fbb27e3b09c5efd28cf7f5a0047c2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "drizzle_config_ts", "label": "drizzle.config.ts", "file_type": "code", "source_file": "drizzle.config.ts", "source_location": "L1"}], "edges": [{"source": "drizzle_config_ts", "target": "config", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "drizzle.config.ts", "source_location": "L1", "weight": 1.0}, {"source": "drizzle_config_ts", "target": "drizzle_kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "drizzle.config.ts", "source_location": "L2", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/d14bcc99a6d820310fac8da5798eb82e689d9368c270d70720f0ccecf640224b.json b/graphify-out/cache/d14bcc99a6d820310fac8da5798eb82e689d9368c270d70720f0ccecf640224b.json new file mode 100644 index 0000000..6bf400c --- /dev/null +++ b/graphify-out/cache/d14bcc99a6d820310fac8da5798eb82e689d9368c270d70720f0ccecf640224b.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_accounts_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/d3b9a0a8a4c5d0795999a50cacd46886bbd11f1e57929a39d54456d88f51962a.json b/graphify-out/cache/d3b9a0a8a4c5d0795999a50cacd46886bbd11f1e57929a39d54456d88f51962a.json new file mode 100644 index 0000000..581edec --- /dev/null +++ b/graphify-out/cache/d3b9a0a8a4c5d0795999a50cacd46886bbd11f1e57929a39d54456d88f51962a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_accounts_ts", "label": "accounts.ts", "file_type": "code", "source_file": "src\\lib\\accounts.ts", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/d3ea0c2f08023658ed2b54b72b81e77505fe2990bcf500cf68c185cb67412698.json b/graphify-out/cache/d3ea0c2f08023658ed2b54b72b81e77505fe2990bcf500cf68c185cb67412698.json new file mode 100644 index 0000000..6899989 --- /dev/null +++ b/graphify-out/cache/d3ea0c2f08023658ed2b54b72b81e77505fe2990bcf500cf68c185cb67412698.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/d4c8f5ea2c47430c2d7265d2f5183bbbaf20f8b4ab74bf9c4a98d7f64fe0a446.json b/graphify-out/cache/d4c8f5ea2c47430c2d7265d2f5183bbbaf20f8b4ab74bf9c4a98d7f64fe0a446.json new file mode 100644 index 0000000..27ef4bf --- /dev/null +++ b/graphify-out/cache/d4c8f5ea2c47430c2d7265d2f5183bbbaf20f8b4ab74bf9c4a98d7f64fe0a446.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_settings_notifications_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/d6248798340acb402d84ab2a5d6da0cbcfc5fb1fd10ef264a8f9338426e3bdac.json b/graphify-out/cache/d6248798340acb402d84ab2a5d6da0cbcfc5fb1fd10ef264a8f9338426e3bdac.json new file mode 100644 index 0000000..e033cf4 --- /dev/null +++ b/graphify-out/cache/d6248798340acb402d84ab2a5d6da0cbcfc5fb1fd10ef264a8f9338426e3bdac.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L8"}], "edges": [{"source": "src_routes_app_assets_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_assets_page_server_ts", "target": "src_routes_app_assets_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L8", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "get", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L10"}, {"caller_nid": "page_server_load", "callee": "get", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "or", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L16"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L16"}, {"caller_nid": "page_server_load", "callee": "sql", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L16"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L17"}, {"caller_nid": "page_server_load", "callee": "listAssets", "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", "source_location": "L19"}]} \ No newline at end of file diff --git a/graphify-out/cache/d7969e302ef782629f9d41313d67db99aa6611e97098e5b380c230d80d4fe24c.json b/graphify-out/cache/d7969e302ef782629f9d41313d67db99aa6611e97098e5b380c230d80d4fe24c.json new file mode 100644 index 0000000..2c48060 --- /dev/null +++ b/graphify-out/cache/d7969e302ef782629f9d41313d67db99aa6611e97098e5b380c230d80d4fe24c.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_decisions_export_csv_server_ts", "label": "+server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L1"}, {"id": "server_get", "label": "GET()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L6"}, {"id": "server_today", "label": "today()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L38"}], "edges": [{"source": "src_routes_app_projects_id_decisions_export_csv_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_export_csv_server_ts", "target": "csv", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_export_csv_server_ts", "target": "decisions", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_export_csv_server_ts", "target": "src_routes_app_projects_id_decisions_export_csv_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_export_csv_server_ts", "target": "server_get", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_projects_id_decisions_export_csv_server_ts", "target": "server_today", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L38", "weight": 1.0}, {"source": "server_get", "target": "server_today", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L35", "weight": 1.0}], "raw_calls": [{"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L7"}, {"caller_nid": "server_get", "callee": "listDecisionsForScope", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L8"}, {"caller_nid": "server_get", "callee": "toCsv", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L10"}, {"caller_nid": "server_get", "callee": "map", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L11"}, {"caller_nid": "server_get", "callee": "csvResponse", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L35"}, {"caller_nid": "server_get", "callee": "slice", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L35"}, {"caller_nid": "server_today", "callee": "slice", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L39"}, {"caller_nid": "server_today", "callee": "toISOString", "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", "source_location": "L39"}]} \ No newline at end of file diff --git a/graphify-out/cache/da5c8d51110d5bd2ff41f6b3d5e5ad6ff13d70dda17b7466159881eb813a1082.json b/graphify-out/cache/da5c8d51110d5bd2ff41f6b3d5e5ad6ff13d70dda17b7466159881eb813a1082.json new file mode 100644 index 0000000..54dc0ac --- /dev/null +++ b/graphify-out/cache/da5c8d51110d5bd2ff41f6b3d5e5ad6ff13d70dda17b7466159881eb813a1082.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_slug_edit_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/db6e8c3092593675b51001e1e1bd585766174bd3b867c6ef00a267775c948ab2.json b/graphify-out/cache/db6e8c3092593675b51001e1e1bd585766174bd3b867c6ef00a267775c948ab2.json new file mode 100644 index 0000000..775afc4 --- /dev/null +++ b/graphify-out/cache/db6e8c3092593675b51001e1e1bd585766174bd3b867c6ef00a267775c948ab2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_label_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts", "source_location": "L4"}], "edges": [{"source": "src_routes_app_assets_id_label_page_server_ts", "target": "env", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_label_page_server_ts", "target": "src_routes_app_assets_id_label_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_label_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts", "source_location": "L4", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "replace", "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts", "source_location": "L7"}]} \ No newline at end of file diff --git a/graphify-out/cache/db96a656d2b2cc508fad97f946619d7d380a21fa2e972f140094f3027386abce.json b/graphify-out/cache/db96a656d2b2cc508fad97f946619d7d380a21fa2e972f140094f3027386abce.json new file mode 100644 index 0000000..c3c506d --- /dev/null +++ b/graphify-out/cache/db96a656d2b2cc508fad97f946619d7d380a21fa2e972f140094f3027386abce.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_maintenance_events_eventid_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/dee1f75dbbd3e59946d1d68d79da4aa7aa548183cd5b17e65fc70c949862d751.json b/graphify-out/cache/dee1f75dbbd3e59946d1d68d79da4aa7aa548183cd5b17e65fc70c949862d751.json new file mode 100644 index 0000000..83d1d95 --- /dev/null +++ b/graphify-out/cache/dee1f75dbbd3e59946d1d68d79da4aa7aa548183cd5b17e65fc70c949862d751.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_storage_index_ts", "label": "index.ts", "file_type": "code", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L1"}, {"id": "index_getstorage", "label": "getStorage()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L8"}, {"id": "index_setstoragefortesting", "label": "_setStorageForTesting()", "file_type": "code", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L35"}], "edges": [{"source": "src_lib_server_storage_index_ts", "target": "src_lib_server_env", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_storage_index_ts", "target": "src_lib_server_storage_local", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_storage_index_ts", "target": "src_lib_server_storage_s3", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_storage_index_ts", "target": "src_lib_server_storage_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_storage_index_ts", "target": "index_getstorage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_lib_server_storage_index_ts", "target": "index_setstoragefortesting", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\storage\\index.ts", "source_location": "L35", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/e16b182a8975982b83c0e0b729fde60786537bb395984aebee3a8cddd9bfd832.json b/graphify-out/cache/e16b182a8975982b83c0e0b729fde60786537bb395984aebee3a8cddd9bfd832.json new file mode 100644 index 0000000..3c7dde2 --- /dev/null +++ b/graphify-out/cache/e16b182a8975982b83c0e0b729fde60786537bb395984aebee3a8cddd9bfd832.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_new_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\new\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/e2791cf5096dbd185c3933680514166dbd072536d41655adeaa6202052ac4b56.json b/graphify-out/cache/e2791cf5096dbd185c3933680514166dbd072536d41655adeaa6202052ac4b56.json new file mode 100644 index 0000000..d51418b --- /dev/null +++ b/graphify-out/cache/e2791cf5096dbd185c3933680514166dbd072536d41655adeaa6202052ac4b56.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_api_documents_server_ts", "label": "+server.ts", "file_type": "code", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L1"}, {"id": "server_post", "label": "POST()", "file_type": "code", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L12"}], "edges": [{"source": "src_routes_api_documents_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_api_documents_server_ts", "target": "documents", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_api_documents_server_ts", "target": "src_routes_api_documents_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_api_documents_server_ts", "target": "server_post", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L12", "weight": 1.0}], "raw_calls": [{"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L13"}, {"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L14"}, {"caller_nid": "server_post", "callee": "formData", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L16"}, {"caller_nid": "server_post", "callee": "String", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L17"}, {"caller_nid": "server_post", "callee": "get", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L17"}, {"caller_nid": "server_post", "callee": "String", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L18"}, {"caller_nid": "server_post", "callee": "get", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L18"}, {"caller_nid": "server_post", "callee": "get", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L19"}, {"caller_nid": "server_post", "callee": "includes", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L21"}, {"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L22"}, {"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L24"}, {"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L25"}, {"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L26"}, {"caller_nid": "server_post", "callee": "from", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L28"}, {"caller_nid": "server_post", "callee": "arrayBuffer", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L28"}, {"caller_nid": "server_post", "callee": "uploadDocument", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L40"}, {"caller_nid": "server_post", "callee": "json", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L41"}, {"caller_nid": "server_post", "callee": "error", "source_file": "src\\routes\\api\\documents\\+server.ts", "source_location": "L44"}]} \ No newline at end of file diff --git a/graphify-out/cache/e28ec732a41b5d48b5dddd560799b21618920e2acd12df8ace38d453e1e704d7.json b/graphify-out/cache/e28ec732a41b5d48b5dddd560799b21618920e2acd12df8ace38d453e1e704d7.json new file mode 100644 index 0000000..5ccf6f7 --- /dev/null +++ b/graphify-out/cache/e28ec732a41b5d48b5dddd560799b21618920e2acd12df8ace38d453e1e704d7.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", "target": "markdown", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", "target": "src_routes_app_projects_id_wiki_slug_revisions_rev_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "getPageWithCurrentRevision", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "parseInt", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L10"}, {"caller_nid": "page_server_load", "callee": "isFinite", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "getRevision", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "renderMarkdown", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", "source_location": "L19"}]} \ No newline at end of file diff --git a/graphify-out/cache/e4398d053bbb5beefe5031222c5b67e51ab61e2b42554864dd0a5c0aaa3425c7.json b/graphify-out/cache/e4398d053bbb5beefe5031222c5b67e51ab61e2b42554864dd0a5c0aaa3425c7.json new file mode 100644 index 0000000..f8988a3 --- /dev/null +++ b/graphify-out/cache/e4398d053bbb5beefe5031222c5b67e51ab61e2b42554864dd0a5c0aaa3425c7.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_slug_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L6"}], "edges": [{"source": "src_routes_app_wiki_slug_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_page_server_ts", "target": "markdown", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_page_server_ts", "target": "src_routes_app_wiki_slug_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_wiki_slug_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "getPageWithCurrentRevision", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L9"}, {"caller_nid": "page_server_load", "callee": "renderMarkdown", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", "source_location": "L14"}]} \ No newline at end of file diff --git a/graphify-out/cache/e4d880b403ddc03a28a9a4fb99c6c6b0296daf315d9894cc5fb6c22d8648c6fa.json b/graphify-out/cache/e4d880b403ddc03a28a9a4fb99c6c6b0296daf315d9894cc5fb6c22d8648c6fa.json new file mode 100644 index 0000000..88f63fe --- /dev/null +++ b/graphify-out/cache/e4d880b403ddc03a28a9a4fb99c6c6b0296daf315d9894cc5fb6c22d8648c6fa.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_csv_ts", "label": "csv.ts", "file_type": "code", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L1"}, {"id": "csv_tocsv", "label": "toCsv()", "file_type": "code", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L6"}, {"id": "csv_tocell", "label": "toCell()", "file_type": "code", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L18"}, {"id": "csv_escape", "label": "escape()", "file_type": "code", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L26"}, {"id": "csv_csvresponse", "label": "csvResponse()", "file_type": "code", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L31"}], "edges": [{"source": "src_lib_server_csv_ts", "target": "csv_tocsv", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_lib_server_csv_ts", "target": "csv_tocell", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L18", "weight": 1.0}, {"source": "src_lib_server_csv_ts", "target": "csv_escape", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L26", "weight": 1.0}, {"source": "src_lib_server_csv_ts", "target": "csv_csvresponse", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L31", "weight": 1.0}], "raw_calls": [{"caller_nid": "csv_tocsv", "callee": "join", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L8"}, {"caller_nid": "csv_tocsv", "callee": "keys", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L10"}, {"caller_nid": "csv_tocsv", "callee": "join", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L11"}, {"caller_nid": "csv_tocsv", "callee": "map", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L11"}, {"caller_nid": "csv_tocsv", "callee": "push", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L13"}, {"caller_nid": "csv_tocsv", "callee": "join", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L13"}, {"caller_nid": "csv_tocsv", "callee": "map", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L13"}, {"caller_nid": "csv_tocsv", "callee": "join", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L15"}, {"caller_nid": "csv_tocell", "callee": "toISOString", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L20"}, {"caller_nid": "csv_tocell", "callee": "isArray", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L21"}, {"caller_nid": "csv_tocell", "callee": "join", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L21"}, {"caller_nid": "csv_tocell", "callee": "map", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L21"}, {"caller_nid": "csv_tocell", "callee": "stringify", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L22"}, {"caller_nid": "csv_tocell", "callee": "String", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L23"}, {"caller_nid": "csv_escape", "callee": "test", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L27"}, {"caller_nid": "csv_escape", "callee": "replace", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L27"}, {"caller_nid": "csv_csvresponse", "callee": "replace", "source_file": "src\\lib\\server\\csv.ts", "source_location": "L35"}]} \ No newline at end of file diff --git a/graphify-out/cache/e5b7d7f7d51cd6fb712e919c7d8aeb4db4816113019c1db2aa39aae74366bbc6.json b/graphify-out/cache/e5b7d7f7d51cd6fb712e919c7d8aeb4db4816113019c1db2aa39aae74366bbc6.json new file mode 100644 index 0000000..59a8475 --- /dev/null +++ b/graphify-out/cache/e5b7d7f7d51cd6fb712e919c7d8aeb4db4816113019c1db2aa39aae74366bbc6.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_auth_layout_svelte", "label": "+layout.svelte", "file_type": "code", "source_file": "src\\routes\\(auth)\\+layout.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/e5c2986d094fc97255ea41ed01db552de273a4c2b7f2f77949430d1993ad1de6.json b/graphify-out/cache/e5c2986d094fc97255ea41ed01db552de273a4c2b7f2f77949430d1993ad1de6.json new file mode 100644 index 0000000..ee27f4b --- /dev/null +++ b/graphify-out/cache/e5c2986d094fc97255ea41ed01db552de273a4c2b7f2f77949430d1993ad1de6.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_checklists_id_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L11"}], "edges": [{"source": "src_routes_app_checklists_id_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_checklists_id_page_server_ts", "target": "checklists", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_checklists_id_page_server_ts", "target": "src_routes_app_checklists_id_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L9", "weight": 1.0}, {"source": "src_routes_app_checklists_id_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L11", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "getTemplate", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L13"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", "source_location": "L14"}]} \ No newline at end of file diff --git a/graphify-out/cache/e68ab01c56cc0249d82307caf162bbdb003d11a313882589941cac42ba0a4595.json b/graphify-out/cache/e68ab01c56cc0249d82307caf162bbdb003d11a313882589941cac42ba0a4595.json new file mode 100644 index 0000000..1db9546 --- /dev/null +++ b/graphify-out/cache/e68ab01c56cc0249d82307caf162bbdb003d11a313882589941cac42ba0a4595.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_documents_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/e6ccdd7bc0e7747600d1586f970df232441812dce610cb6104579ccdcf65879e.json b/graphify-out/cache/e6ccdd7bc0e7747600d1586f970df232441812dce610cb6104579ccdcf65879e.json new file mode 100644 index 0000000..ac6d309 --- /dev/null +++ b/graphify-out/cache/e6ccdd7bc0e7747600d1586f970df232441812dce610cb6104579ccdcf65879e.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_maintenance_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L18"}], "edges": [{"source": "src_routes_app_assets_id_maintenance_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_page_server_ts", "target": "checklists", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_page_server_ts", "target": "maintenance", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_page_server_ts", "target": "src_routes_app_assets_id_maintenance_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L16", "weight": 1.0}, {"source": "src_routes_app_assets_id_maintenance_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L18", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L19"}, {"caller_nid": "page_server_load", "callee": "all", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L20"}, {"caller_nid": "page_server_load", "callee": "listSchedulesForAsset", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L21"}, {"caller_nid": "page_server_load", "callee": "listEventsForAsset", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L22"}, {"caller_nid": "page_server_load", "callee": "listUsageReadingsForAsset", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L23"}, {"caller_nid": "page_server_load", "callee": "listTemplates", "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", "source_location": "L24"}]} \ No newline at end of file diff --git a/graphify-out/cache/e6e0769b084e50ac615d2e68056dbc5715c481b8acbf934bd6efce1cee42c47a.json b/graphify-out/cache/e6e0769b084e50ac615d2e68056dbc5715c481b8acbf934bd6efce1cee42c47a.json new file mode 100644 index 0000000..33816e7 --- /dev/null +++ b/graphify-out/cache/e6e0769b084e50ac615d2e68056dbc5715c481b8acbf934bd6efce1cee42c47a.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_label_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/e8469ed6c980a773c01ca4825cf6cfcf76a3de7a50150e9d51d793ef3c5a1821.json b/graphify-out/cache/e8469ed6c980a773c01ca4825cf6cfcf76a3de7a50150e9d51d793ef3c5a1821.json new file mode 100644 index 0000000..501a31f --- /dev/null +++ b/graphify-out/cache/e8469ed6c980a773c01ca4825cf6cfcf76a3de7a50150e9d51d793ef3c5a1821.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_wiki_slug_edit_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/e93782a2283f7adfcc0a530bfe863a2e5a9467ba0f1e0d9faeeaa669f1aa2ceb.json b/graphify-out/cache/e93782a2283f7adfcc0a530bfe863a2e5a9467ba0f1e0d9faeeaa669f1aa2ceb.json new file mode 100644 index 0000000..9b02f70 --- /dev/null +++ b/graphify-out/cache/e93782a2283f7adfcc0a530bfe863a2e5a9467ba0f1e0d9faeeaa669f1aa2ceb.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_services_tasks_ts", "label": "tasks.ts", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L1"}, {"id": "tasks_assertworkpackage", "label": "assertWorkPackage()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L8"}, {"id": "tasks_listtasksforworkpackage", "label": "listTasksForWorkPackage()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L24"}, {"id": "tasks_createtask", "label": "createTask()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L33"}, {"id": "tasks_gettaskwithsubtasks", "label": "getTaskWithSubtasks()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L62"}, {"id": "tasks_updatetask", "label": "updateTask()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L79"}, {"id": "tasks_softdeletetask", "label": "softDeleteTask()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L125"}, {"id": "tasks_addsubtask", "label": "addSubtask()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L136"}, {"id": "tasks_togglesubtask", "label": "toggleSubtask()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L143"}, {"id": "tasks_removesubtask", "label": "removeSubtask()", "file_type": "code", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L157"}], "edges": [{"source": "src_lib_server_services_tasks_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "projects", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "src_lib_server_services_notifications", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_assertworkpackage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_listtasksforworkpackage", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L24", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_createtask", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L33", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_gettaskwithsubtasks", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L62", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_updatetask", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L79", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_softdeletetask", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L125", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_addsubtask", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L136", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_togglesubtask", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L143", "weight": 1.0}, {"source": "src_lib_server_services_tasks_ts", "target": "tasks_removesubtask", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L157", "weight": 1.0}, {"source": "tasks_listtasksforworkpackage", "target": "tasks_assertworkpackage", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L25", "weight": 1.0}, {"source": "tasks_createtask", "target": "tasks_assertworkpackage", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L42", "weight": 1.0}, {"source": "tasks_updatetask", "target": "tasks_gettaskwithsubtasks", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L90", "weight": 1.0}, {"source": "tasks_softdeletetask", "target": "tasks_gettaskwithsubtasks", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L126", "weight": 1.0}, {"source": "tasks_addsubtask", "target": "tasks_gettaskwithsubtasks", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L137", "weight": 1.0}, {"source": "tasks_togglesubtask", "target": "tasks_gettaskwithsubtasks", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L149", "weight": 1.0}, {"source": "tasks_removesubtask", "target": "tasks_gettaskwithsubtasks", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L162", "weight": 1.0}], "raw_calls": [{"caller_nid": "tasks_assertworkpackage", "callee": "limit", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L9"}, {"caller_nid": "tasks_assertworkpackage", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L9"}, {"caller_nid": "tasks_assertworkpackage", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L9"}, {"caller_nid": "tasks_assertworkpackage", "callee": "from", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L9"}, {"caller_nid": "tasks_assertworkpackage", "callee": "select", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L9"}, {"caller_nid": "tasks_assertworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L12"}, {"caller_nid": "tasks_assertworkpackage", "callee": "and", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L14"}, {"caller_nid": "tasks_assertworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L15"}, {"caller_nid": "tasks_assertworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L16"}, {"caller_nid": "tasks_assertworkpackage", "callee": "isNull", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L17"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L26"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L26"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "from", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L26"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "select", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L26"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "and", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L29"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L29"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "isNull", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L29"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "asc", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L30"}, {"caller_nid": "tasks_listtasksforworkpackage", "callee": "asc", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L30"}, {"caller_nid": "tasks_createtask", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L43"}, {"caller_nid": "tasks_createtask", "callee": "from", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L43"}, {"caller_nid": "tasks_createtask", "callee": "select", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L43"}, {"caller_nid": "tasks_createtask", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L46"}, {"caller_nid": "tasks_createtask", "callee": "returning", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L47"}, {"caller_nid": "tasks_createtask", "callee": "values", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L47"}, {"caller_nid": "tasks_createtask", "callee": "insert", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L47"}, {"caller_nid": "tasks_createtask", "callee": "trim", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L51"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "limit", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L63"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L63"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L63"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "innerJoin", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L63"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "from", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L63"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "select", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L63"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L66"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L67"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "and", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L68"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L68"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L68"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "isNull", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L68"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "orderBy", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L71"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L71"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "from", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L71"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "select", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L71"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L74"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "asc", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L75"}, {"caller_nid": "tasks_gettaskwithsubtasks", "callee": "asc", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L75"}, {"caller_nid": "tasks_updatetask", "callee": "trim", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L94"}, {"caller_nid": "tasks_updatetask", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L104"}, {"caller_nid": "tasks_updatetask", "callee": "set", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L104"}, {"caller_nid": "tasks_updatetask", "callee": "update", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L104"}, {"caller_nid": "tasks_updatetask", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L104"}, {"caller_nid": "tasks_updatetask", "callee": "notify", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L114"}, {"caller_nid": "tasks_updatetask", "callee": "slice", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L119"}, {"caller_nid": "tasks_softdeletetask", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L128"}, {"caller_nid": "tasks_softdeletetask", "callee": "set", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L128"}, {"caller_nid": "tasks_softdeletetask", "callee": "update", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L128"}, {"caller_nid": "tasks_softdeletetask", "callee": "sql", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L130"}, {"caller_nid": "tasks_softdeletetask", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L131"}, {"caller_nid": "tasks_addsubtask", "callee": "values", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L140"}, {"caller_nid": "tasks_addsubtask", "callee": "insert", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L140"}, {"caller_nid": "tasks_addsubtask", "callee": "trim", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L140"}, {"caller_nid": "tasks_togglesubtask", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L151"}, {"caller_nid": "tasks_togglesubtask", "callee": "set", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L151"}, {"caller_nid": "tasks_togglesubtask", "callee": "update", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L151"}, {"caller_nid": "tasks_togglesubtask", "callee": "and", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L154"}, {"caller_nid": "tasks_togglesubtask", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L154"}, {"caller_nid": "tasks_togglesubtask", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L154"}, {"caller_nid": "tasks_removesubtask", "callee": "where", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L164"}, {"caller_nid": "tasks_removesubtask", "callee": "delete", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L164"}, {"caller_nid": "tasks_removesubtask", "callee": "and", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L166"}, {"caller_nid": "tasks_removesubtask", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L166"}, {"caller_nid": "tasks_removesubtask", "callee": "eq", "source_file": "src\\lib\\server\\services\\tasks.ts", "source_location": "L166"}]} \ No newline at end of file diff --git a/graphify-out/cache/e94287a546ceccea2834c441f2d7badec65e60c081253ec7870f86d93931a063.json b/graphify-out/cache/e94287a546ceccea2834c441f2d7badec65e60c081253ec7870f86d93931a063.json new file mode 100644 index 0000000..f423232 --- /dev/null +++ b/graphify-out/cache/e94287a546ceccea2834c441f2d7badec65e60c081253ec7870f86d93931a063.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_lib_server_db_schema_rooms_ts", "label": "rooms.ts", "file_type": "code", "source_file": "src\\lib\\server\\db\\schema\\rooms.ts", "source_location": "L1"}], "edges": [{"source": "src_lib_server_db_schema_rooms_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\rooms.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_lib_server_db_schema_rooms_ts", "target": "pg_core", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\rooms.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_lib_server_db_schema_rooms_ts", "target": "src_lib_server_db_schema_properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\rooms.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_lib_server_db_schema_rooms_ts", "target": "src_lib_server_db_schema_shared", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\lib\\server\\db\\schema\\rooms.ts", "source_location": "L4", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/ea6bcb64fe08b287b22b11385f9f6d94ba64308d2a415ed67bad43a437a828ea.json b/graphify-out/cache/ea6bcb64fe08b287b22b11385f9f6d94ba64308d2a415ed67bad43a437a828ea.json new file mode 100644 index 0000000..fe943cc --- /dev/null +++ b/graphify-out/cache/ea6bcb64fe08b287b22b11385f9f6d94ba64308d2a415ed67bad43a437a828ea.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_move_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/ebd0221dd30104444143c05516044e635940b43f9d040df4b4582c7277b75782.json b/graphify-out/cache/ebd0221dd30104444143c05516044e635940b43f9d040df4b4582c7277b75782.json new file mode 100644 index 0000000..8698ee1 --- /dev/null +++ b/graphify-out/cache/ebd0221dd30104444143c05516044e635940b43f9d040df4b4582c7277b75782.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_users_page_svelte", "label": "+page.svelte", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\users\\+page.svelte", "source_location": "L1"}], "edges": [], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/f16c494b5f0b225b4b719ef15f5fae57cdaa941ac2b18968b2fb6a3304bc3a20.json b/graphify-out/cache/f16c494b5f0b225b4b719ef15f5fae57cdaa941ac2b18968b2fb6a3304bc3a20.json new file mode 100644 index 0000000..8680486 --- /dev/null +++ b/graphify-out/cache/f16c494b5f0b225b4b719ef15f5fae57cdaa941ac2b18968b2fb6a3304bc3a20.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_id_accounts_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L32"}], "edges": [{"source": "src_routes_app_properties_id_accounts_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_properties_id_accounts_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_properties_id_accounts_page_server_ts", "target": "accounts", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_properties_id_accounts_page_server_ts", "target": "src_routes_app_properties_id_accounts_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L10", "weight": 1.0}, {"source": "src_routes_app_properties_id_accounts_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L32", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L33"}, {"caller_nid": "page_server_load", "callee": "listAccounts", "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", "source_location": "L34"}]} \ No newline at end of file diff --git a/graphify-out/cache/f251ba80b907a0499fb2870ad7001c5e946799ce8478bdad01f56890e41eb8a2.json b/graphify-out/cache/f251ba80b907a0499fb2870ad7001c5e946799ce8478bdad01f56890e41eb8a2.json new file mode 100644 index 0000000..a0f1e40 --- /dev/null +++ b/graphify-out/cache/f251ba80b907a0499fb2870ad7001c5e946799ce8478bdad01f56890e41eb8a2.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_asset_types_new_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\asset-types\\new\\+page.server.ts", "source_location": "L1"}], "edges": [{"source": "src_routes_app_admin_asset_types_new_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\new\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_new_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\new\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_new_page_server_ts", "target": "asset_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\new\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_admin_asset_types_new_page_server_ts", "target": "src_routes_app_admin_asset_types_new_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\asset-types\\new\\+page.server.ts", "source_location": "L4", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/f519a59465f09c4494430acf2f8e205c2c259f76c102489cbc39b802a21e0125.json b/graphify-out/cache/f519a59465f09c4494430acf2f8e205c2c259f76c102489cbc39b802a21e0125.json new file mode 100644 index 0000000..7fb8f03 --- /dev/null +++ b/graphify-out/cache/f519a59465f09c4494430acf2f8e205c2c259f76c102489cbc39b802a21e0125.json @@ -0,0 +1 @@ +{"nodes": [{"id": "scripts_seed_system_asset_types_ts", "label": "system-asset-types.ts", "file_type": "code", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L1"}, {"id": "system_asset_types_upsertsystemtype", "label": "upsertSystemType()", "file_type": "code", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L266"}, {"id": "system_asset_types_syncfielddefs", "label": "syncFieldDefs()", "file_type": "code", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L306"}, {"id": "system_asset_types_main", "label": "main()", "file_type": "code", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L364"}], "edges": [{"source": "scripts_seed_system_asset_types_ts", "target": "config", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L1", "weight": 1.0}, {"source": "scripts_seed_system_asset_types_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L2", "weight": 1.0}, {"source": "scripts_seed_system_asset_types_ts", "target": "src_lib_server_db_client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L3", "weight": 1.0}, {"source": "scripts_seed_system_asset_types_ts", "target": "src_lib_server_db_client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L4", "weight": 1.0}, {"source": "scripts_seed_system_asset_types_ts", "target": "src_lib_server_db_schema_assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L5", "weight": 1.0}, {"source": "scripts_seed_system_asset_types_ts", "target": "system_asset_types_upsertsystemtype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L266", "weight": 1.0}, {"source": "scripts_seed_system_asset_types_ts", "target": "system_asset_types_syncfielddefs", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L306", "weight": 1.0}, {"source": "scripts_seed_system_asset_types_ts", "target": "system_asset_types_main", "relation": "contains", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L364", "weight": 1.0}, {"source": "system_asset_types_main", "target": "system_asset_types_upsertsystemtype", "relation": "calls", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L368", "weight": 1.0}, {"source": "system_asset_types_main", "target": "system_asset_types_syncfielddefs", "relation": "calls", "confidence": "EXTRACTED", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L369", "weight": 1.0}], "raw_calls": [{"caller_nid": "system_asset_types_upsertsystemtype", "callee": "limit", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L268"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "where", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L268"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "from", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L268"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "select", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L268"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "and", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L271"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "isNull", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L271"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "eq", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L271"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "where", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L281"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "set", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L281"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "update", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L281"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "eq", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L288"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "returning", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L293"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "values", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L293"}, {"caller_nid": "system_asset_types_upsertsystemtype", "callee": "insert", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L293"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "where", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L307"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "from", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L307"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "select", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L307"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "eq", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L310"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "map", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L311"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "get", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L326"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "values", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L328"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "insert", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L328"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "stringify", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L340"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "stringify", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L340"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "where", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L345"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "set", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L345"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "update", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L345"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "eq", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L348"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "delete", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L350"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "values", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L354"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "where", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L356"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "set", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L356"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "update", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L356"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "sql", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L358"}, {"caller_nid": "system_asset_types_syncfielddefs", "callee": "eq", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L359"}, {"caller_nid": "system_asset_types_main", "callee": "log", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L365"}, {"caller_nid": "system_asset_types_main", "callee": "log", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L371"}, {"caller_nid": "system_asset_types_main", "callee": "log", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L373"}, {"caller_nid": "system_asset_types_main", "callee": "end", "source_file": "scripts\\seed\\system-asset-types.ts", "source_location": "L374"}]} \ No newline at end of file diff --git a/graphify-out/cache/f557b7d36ec56ce6ff3e48855f0575810c73269a9fe45043cb79eff4ce8f4911.json b/graphify-out/cache/f557b7d36ec56ce6ff3e48855f0575810c73269a9fe45043cb79eff4ce8f4911.json new file mode 100644 index 0000000..e94d0ff --- /dev/null +++ b/graphify-out/cache/f557b7d36ec56ce6ff3e48855f0575810c73269a9fe45043cb79eff4ce8f4911.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_assets_id_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L10"}, {"id": "page_server_e2n", "label": "e2n()", "file_type": "code", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L44"}], "edges": [{"source": "src_routes_app_assets_id_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "drizzle_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "client", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "rooms", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "assets", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "custom_fields_form", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "src_routes_app_assets_id_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L8", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L10", "weight": 1.0}, {"source": "src_routes_app_assets_id_page_server_ts", "target": "page_server_e2n", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L44", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "parent", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L12"}, {"caller_nid": "page_server_load", "callee": "orderBy", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "where", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "leftJoin", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "from", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "select", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L15"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L22"}, {"caller_nid": "page_server_load", "callee": "and", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L24"}, {"caller_nid": "page_server_load", "callee": "eq", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L25"}, {"caller_nid": "page_server_load", "callee": "isNull", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L26"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L29"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L29"}, {"caller_nid": "page_server_load", "callee": "asc", "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", "source_location": "L29"}]} \ No newline at end of file diff --git a/graphify-out/cache/f771203fbcdf0eaa42aa47f0a5637a97a122436ea5cf62072e18e55a2451410b.json b/graphify-out/cache/f771203fbcdf0eaa42aa47f0a5637a97a122436ea5cf62072e18e55a2451410b.json new file mode 100644 index 0000000..e0f77f2 --- /dev/null +++ b/graphify-out/cache/f771203fbcdf0eaa42aa47f0a5637a97a122436ea5cf62072e18e55a2451410b.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_settings_notifications_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L9"}], "edges": [{"source": "src_routes_app_settings_notifications_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_settings_notifications_page_server_ts", "target": "guards", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_settings_notifications_page_server_ts", "target": "notifications", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_settings_notifications_page_server_ts", "target": "src_routes_app_settings_notifications_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L7", "weight": 1.0}, {"source": "src_routes_app_settings_notifications_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L9", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "requireCompany", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L10"}, {"caller_nid": "page_server_load", "callee": "getUserPrefs", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L11"}, {"caller_nid": "page_server_load", "callee": "Boolean", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L16"}, {"caller_nid": "page_server_load", "callee": "Boolean", "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", "source_location": "L19"}]} \ No newline at end of file diff --git a/graphify-out/cache/f8179fb42121b104130fab8956e5bc4ed3474e8a04a2820698fc9e6583d426b8.json b/graphify-out/cache/f8179fb42121b104130fab8956e5bc4ed3474e8a04a2820698fc9e6583d426b8.json new file mode 100644 index 0000000..152f969 --- /dev/null +++ b/graphify-out/cache/f8179fb42121b104130fab8956e5bc4ed3474e8a04a2820698fc9e6583d426b8.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_properties_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_properties_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_properties_page_server_ts", "target": "properties", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_properties_page_server_ts", "target": "src_routes_app_properties_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_properties_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "listProperties", "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", "source_location": "L7"}]} \ No newline at end of file diff --git a/graphify-out/cache/f89301302dc25a97b9facba7cfdd683a0af706c782ae1894740f1a06d59d3ac8.json b/graphify-out/cache/f89301302dc25a97b9facba7cfdd683a0af706c782ae1894740f1a06d59d3ac8.json new file mode 100644 index 0000000..54a813e --- /dev/null +++ b/graphify-out/cache/f89301302dc25a97b9facba7cfdd683a0af706c782ae1894740f1a06d59d3ac8.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_projects_id_wiki_slug_history_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L1"}, {"id": "page_server_load", "label": "load()", "file_type": "code", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L5"}], "edges": [{"source": "src_routes_app_projects_id_wiki_slug_history_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_history_page_server_ts", "target": "wiki", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_history_page_server_ts", "target": "src_routes_app_projects_id_wiki_slug_history_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_projects_id_wiki_slug_history_page_server_ts", "target": "page_server_load", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L5", "weight": 1.0}], "raw_calls": [{"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L6"}, {"caller_nid": "page_server_load", "callee": "getPageWithCurrentRevision", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L7"}, {"caller_nid": "page_server_load", "callee": "error", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L8"}, {"caller_nid": "page_server_load", "callee": "listRevisions", "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", "source_location": "L9"}]} \ No newline at end of file diff --git a/graphify-out/cache/fe4a551758cb4c2fe22ebbb5ee4e031bc5af94a951bb2819743d6891aa4fa0a9.json b/graphify-out/cache/fe4a551758cb4c2fe22ebbb5ee4e031bc5af94a951bb2819743d6891aa4fa0a9.json new file mode 100644 index 0000000..9311bd8 --- /dev/null +++ b/graphify-out/cache/fe4a551758cb4c2fe22ebbb5ee4e031bc5af94a951bb2819743d6891aa4fa0a9.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_admin_company_new_page_server_ts", "label": "+page.server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts", "source_location": "L1"}], "edges": [{"source": "src_routes_app_admin_company_new_page_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_admin_company_new_page_server_ts", "target": "zod", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_admin_company_new_page_server_ts", "target": "guards", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_admin_company_new_page_server_ts", "target": "session", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_admin_company_new_page_server_ts", "target": "companies", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts", "source_location": "L5", "weight": 1.0}, {"source": "src_routes_app_admin_company_new_page_server_ts", "target": "src_routes_app_admin_company_new_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts", "source_location": "L6", "weight": 1.0}], "raw_calls": []} \ No newline at end of file diff --git a/graphify-out/cache/fe7be5d1ccc053514f814e31e848f804eb56c8e0a5803b30bf410a34eac68224.json b/graphify-out/cache/fe7be5d1ccc053514f814e31e848f804eb56c8e0a5803b30bf410a34eac68224.json new file mode 100644 index 0000000..055fc29 --- /dev/null +++ b/graphify-out/cache/fe7be5d1ccc053514f814e31e848f804eb56c8e0a5803b30bf410a34eac68224.json @@ -0,0 +1 @@ +{"nodes": [{"id": "src_routes_app_maintenance_export_csv_server_ts", "label": "+server.ts", "file_type": "code", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L1"}, {"id": "server_get", "label": "GET()", "file_type": "code", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L6"}, {"id": "server_today", "label": "today()", "file_type": "code", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L30"}], "edges": [{"source": "src_routes_app_maintenance_export_csv_server_ts", "target": "kit", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L1", "weight": 1.0}, {"source": "src_routes_app_maintenance_export_csv_server_ts", "target": "csv", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L2", "weight": 1.0}, {"source": "src_routes_app_maintenance_export_csv_server_ts", "target": "maintenance", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L3", "weight": 1.0}, {"source": "src_routes_app_maintenance_export_csv_server_ts", "target": "src_routes_app_maintenance_export_csv_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L4", "weight": 1.0}, {"source": "src_routes_app_maintenance_export_csv_server_ts", "target": "server_get", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L6", "weight": 1.0}, {"source": "src_routes_app_maintenance_export_csv_server_ts", "target": "server_today", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L30", "weight": 1.0}, {"source": "server_get", "target": "server_today", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L27", "weight": 1.0}], "raw_calls": [{"caller_nid": "server_get", "callee": "error", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L7"}, {"caller_nid": "server_get", "callee": "parseInt", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L8"}, {"caller_nid": "server_get", "callee": "listDueAndOverdue", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L9"}, {"caller_nid": "server_get", "callee": "toCsv", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L15"}, {"caller_nid": "server_get", "callee": "map", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L16"}, {"caller_nid": "server_get", "callee": "csvResponse", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L27"}, {"caller_nid": "server_today", "callee": "slice", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L31"}, {"caller_nid": "server_today", "callee": "toISOString", "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", "source_location": "L31"}]} \ No newline at end of file diff --git a/graphify-out/cost.json b/graphify-out/cost.json new file mode 100644 index 0000000..3f9a817 --- /dev/null +++ b/graphify-out/cost.json @@ -0,0 +1,12 @@ +{ + "runs": [ + { + "date": "2026-04-23T08:16:40.849507+00:00", + "input_tokens": 0, + "output_tokens": 0, + "files": 189 + } + ], + "total_input_tokens": 0, + "total_output_tokens": 0 +} \ No newline at end of file diff --git a/graphify-out/graph.html b/graphify-out/graph.html new file mode 100644 index 0000000..c96e911 --- /dev/null +++ b/graphify-out/graph.html @@ -0,0 +1,257 @@ + + + + +graphify - graphify-out/graph.html + + + + +
+ + + + + \ No newline at end of file diff --git a/graphify-out/graph.json b/graphify-out/graph.json new file mode 100644 index 0000000..c6544c5 --- /dev/null +++ b/graphify-out/graph.json @@ -0,0 +1,10247 @@ +{ + "directed": false, + "multigraph": false, + "graph": { + "hyperedges": [ + { + "id": "auth_session_flow", + "label": "Session auth flow (cookie, hash, hook, gate)", + "nodes": [ + "readme_auth_model", + "readme_sha256_cookie_hash", + "readme_sliding_renewal", + "readme_hooks_server", + "readme_layout_app_group" + ], + "relation": "participate_in", + "confidence": "EXTRACTED", + "confidence_score": 0.95, + "source_file": "README.md" + }, + { + "id": "storage_abstraction_stack", + "label": "Storage abstraction (adapter, local impl, signed URLs, file route)", + "nodes": [ + "readme_storage_adapter", + "readme_local_disk_storage", + "readme_hmac_signed_urls", + "readme_api_files_route", + "readme_storage_model" + ], + "relation": "implement", + "confidence": "EXTRACTED", + "confidence_score": 0.95, + "source_file": "README.md" + }, + { + "id": "theme_propagation_pattern", + "label": "Cross-sibling theme propagation via localStorage", + "nodes": [ + "readme_decision_theme_key", + "apphtml_theme_bootstrap", + "readme_buildfor_life_budget", + "readme_buildfor_life_repair" + ], + "relation": "form", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "README.md" + } + ] + }, + "nodes": [ + { + "label": "drizzle.config.ts", + "file_type": "code", + "source_file": "drizzle.config.ts", + "source_location": "L1", + "id": "drizzle_config_ts", + "community": 29, + "norm_label": "drizzle.config.ts" + }, + { + "label": "svelte.config.js", + "file_type": "code", + "source_file": "svelte.config.js", + "source_location": "L1", + "id": "svelte_config_js", + "community": 30, + "norm_label": "svelte.config.js" + }, + { + "label": "vite.config.ts", + "file_type": "code", + "source_file": "vite.config.ts", + "source_location": "L1", + "id": "vite_config_ts", + "community": 31, + "norm_label": "vite.config.ts" + }, + { + "label": "create-user.ts", + "file_type": "code", + "source_file": "scripts\\create-user.ts", + "source_location": "L1", + "id": "scripts_create_user_ts", + "community": 10, + "norm_label": "create-user.ts" + }, + { + "label": "slugify()", + "file_type": "code", + "source_file": "scripts\\create-user.ts", + "source_location": "L9", + "id": "create_user_slugify", + "community": 10, + "norm_label": "slugify()" + }, + { + "label": "stripSurroundingQuotes()", + "file_type": "code", + "source_file": "scripts\\create-user.ts", + "source_location": "L16", + "id": "create_user_stripsurroundingquotes", + "community": 10, + "norm_label": "stripsurroundingquotes()" + }, + { + "label": "readArg()", + "file_type": "code", + "source_file": "scripts\\create-user.ts", + "source_location": "L26", + "id": "create_user_readarg", + "community": 10, + "norm_label": "readarg()" + }, + { + "label": "main()", + "file_type": "code", + "source_file": "scripts\\create-user.ts", + "source_location": "L31", + "id": "create_user_main", + "community": 10, + "norm_label": "main()" + }, + { + "label": "diag-user.ts", + "file_type": "code", + "source_file": "scripts\\diag-user.ts", + "source_location": "L1", + "id": "scripts_diag_user_ts", + "community": 10, + "norm_label": "diag-user.ts" + }, + { + "label": "stripSurroundingQuotes()", + "file_type": "code", + "source_file": "scripts\\diag-user.ts", + "source_location": "L8", + "id": "diag_user_stripsurroundingquotes", + "community": 10, + "norm_label": "stripsurroundingquotes()" + }, + { + "label": "readArg()", + "file_type": "code", + "source_file": "scripts\\diag-user.ts", + "source_location": "L18", + "id": "diag_user_readarg", + "community": 10, + "norm_label": "readarg()" + }, + { + "label": "main()", + "file_type": "code", + "source_file": "scripts\\diag-user.ts", + "source_location": "L23", + "id": "diag_user_main", + "community": 10, + "norm_label": "main()" + }, + { + "label": "system-asset-types.ts", + "file_type": "code", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L1", + "id": "scripts_seed_system_asset_types_ts", + "community": 2, + "norm_label": "system-asset-types.ts" + }, + { + "label": "upsertSystemType()", + "file_type": "code", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L266", + "id": "system_asset_types_upsertsystemtype", + "community": 2, + "norm_label": "upsertsystemtype()" + }, + { + "label": "syncFieldDefs()", + "file_type": "code", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L306", + "id": "system_asset_types_syncfielddefs", + "community": 2, + "norm_label": "syncfielddefs()" + }, + { + "label": "main()", + "file_type": "code", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L364", + "id": "system_asset_types_main", + "community": 2, + "norm_label": "main()" + }, + { + "label": "app.d.ts", + "file_type": "code", + "source_file": "src\\app.d.ts", + "source_location": "L1", + "id": "src_app_d_ts", + "community": 32, + "norm_label": "app.d.ts" + }, + { + "label": "hooks.server.ts", + "file_type": "code", + "source_file": "src\\hooks.server.ts", + "source_location": "L1", + "id": "src_hooks_server_ts", + "community": 4, + "norm_label": "hooks.server.ts" + }, + { + "label": "handle()", + "file_type": "code", + "source_file": "src\\hooks.server.ts", + "source_location": "L9", + "id": "hooks_server_handle", + "community": 4, + "norm_label": "handle()" + }, + { + "label": "accounts.ts", + "file_type": "code", + "source_file": "src\\lib\\accounts.ts", + "source_location": "L1", + "id": "src_lib_accounts_ts", + "community": 33, + "norm_label": "accounts.ts" + }, + { + "label": "field-types.ts", + "file_type": "code", + "source_file": "src\\lib\\field-types.ts", + "source_location": "L1", + "id": "src_lib_field_types_ts", + "community": 23, + "norm_label": "field-types.ts" + }, + { + "label": "needsEnumValues()", + "file_type": "code", + "source_file": "src\\lib\\field-types.ts", + "source_location": "L54", + "id": "field_types_needsenumvalues", + "community": 23, + "norm_label": "needsenumvalues()" + }, + { + "label": "notifications.ts", + "file_type": "code", + "source_file": "src\\lib\\notifications.ts", + "source_location": "L1", + "id": "src_lib_notifications_ts", + "community": 34, + "norm_label": "notifications.ts" + }, + { + "label": "roles.ts", + "file_type": "code", + "source_file": "src\\lib\\roles.ts", + "source_location": "L1", + "id": "src_lib_roles_ts", + "community": 35, + "norm_label": "roles.ts" + }, + { + "label": "CustomFieldsForm.svelte", + "file_type": "code", + "source_file": "src\\lib\\components\\CustomFieldsForm.svelte", + "source_location": "L1", + "id": "src_lib_components_customfieldsform_svelte", + "community": 36, + "norm_label": "customfieldsform.svelte" + }, + { + "label": "Sidebar.svelte", + "file_type": "code", + "source_file": "src\\lib\\components\\Sidebar.svelte", + "source_location": "L1", + "id": "src_lib_components_sidebar_svelte", + "community": 37, + "norm_label": "sidebar.svelte" + }, + { + "label": "TabNav.svelte", + "file_type": "code", + "source_file": "src\\lib\\components\\TabNav.svelte", + "source_location": "L1", + "id": "src_lib_components_tabnav_svelte", + "community": 38, + "norm_label": "tabnav.svelte" + }, + { + "label": "ThemeToggle.svelte", + "file_type": "code", + "source_file": "src\\lib\\components\\ThemeToggle.svelte", + "source_location": "L1", + "id": "src_lib_components_themetoggle_svelte", + "community": 39, + "norm_label": "themetoggle.svelte" + }, + { + "label": "TopBar.svelte", + "file_type": "code", + "source_file": "src\\lib\\components\\TopBar.svelte", + "source_location": "L1", + "id": "src_lib_components_topbar_svelte", + "community": 40, + "norm_label": "topbar.svelte" + }, + { + "label": "csv.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L1", + "id": "src_lib_server_csv_ts", + "community": 2, + "norm_label": "csv.ts" + }, + { + "label": "toCsv()", + "file_type": "code", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L6", + "id": "csv_tocsv", + "community": 2, + "norm_label": "tocsv()" + }, + { + "label": "toCell()", + "file_type": "code", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L18", + "id": "csv_tocell", + "community": 2, + "norm_label": "tocell()" + }, + { + "label": "escape()", + "file_type": "code", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L26", + "id": "csv_escape", + "community": 2, + "norm_label": "escape()" + }, + { + "label": "csvResponse()", + "file_type": "code", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L31", + "id": "csv_csvresponse", + "community": 2, + "norm_label": "csvresponse()" + }, + { + "label": "custom-fields-form.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\custom-fields-form.ts", + "source_location": "L1", + "id": "src_lib_server_custom_fields_form_ts", + "community": 2, + "norm_label": "custom-fields-form.ts" + }, + { + "label": "gatherCustomFieldsFromForm()", + "file_type": "code", + "source_file": "src\\lib\\server\\custom-fields-form.ts", + "source_location": "L8", + "id": "custom_fields_form_gathercustomfieldsfromform", + "community": 2, + "norm_label": "gathercustomfieldsfromform()" + }, + { + "label": "env.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\env.ts", + "source_location": "L1", + "id": "src_lib_server_env_ts", + "community": 41, + "norm_label": "env.ts" + }, + { + "label": "markdown.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\markdown.ts", + "source_location": "L1", + "id": "src_lib_server_markdown_ts", + "community": 3, + "norm_label": "markdown.ts" + }, + { + "label": "html()", + "file_type": "code", + "source_file": "src\\lib\\server\\markdown.ts", + "source_location": "L10", + "id": "markdown_html", + "community": 3, + "norm_label": "html()" + }, + { + "label": "escapeHtml()", + "file_type": "code", + "source_file": "src\\lib\\server\\markdown.ts", + "source_location": "L17", + "id": "markdown_escapehtml", + "community": 3, + "norm_label": "escapehtml()" + }, + { + "label": "renderMarkdown()", + "file_type": "code", + "source_file": "src\\lib\\server\\markdown.ts", + "source_location": "L26", + "id": "markdown_rendermarkdown", + "community": 3, + "norm_label": "rendermarkdown()" + }, + { + "label": "guards.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\guards.ts", + "source_location": "L1", + "id": "src_lib_server_auth_guards_ts", + "community": 0, + "norm_label": "guards.ts" + }, + { + "label": "requireCompany()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\guards.ts", + "source_location": "L8", + "id": "guards_requirecompany", + "community": 0, + "norm_label": "requirecompany()" + }, + { + "label": "requireAdmin()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\guards.ts", + "source_location": "L22", + "id": "guards_requireadmin", + "community": 0, + "norm_label": "requireadmin()" + }, + { + "label": "session.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L1", + "id": "src_lib_server_auth_session_ts", + "community": 4, + "norm_label": "session.ts" + }, + { + "label": "generateSessionToken()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L12", + "id": "session_generatesessiontoken", + "community": 4, + "norm_label": "generatesessiontoken()" + }, + { + "label": "hashToken()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L18", + "id": "session_hashtoken", + "community": 4, + "norm_label": "hashtoken()" + }, + { + "label": "createSession()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L22", + "id": "session_createsession", + "community": 4, + "norm_label": "createsession()" + }, + { + "label": "validateSession()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L45", + "id": "session_validatesession", + "community": 4, + "norm_label": "validatesession()" + }, + { + "label": "refreshSession()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L98", + "id": "session_refreshsession", + "community": 4, + "norm_label": "refreshsession()" + }, + { + "label": "invalidateSession()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L106", + "id": "session_invalidatesession", + "community": 4, + "norm_label": "invalidatesession()" + }, + { + "label": "setActiveCompany()", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L110", + "id": "session_setactivecompany", + "community": 1, + "norm_label": "setactivecompany()" + }, + { + "label": "types.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\auth\\types.ts", + "source_location": "L1", + "id": "src_lib_server_auth_types_ts", + "community": 42, + "norm_label": "types.ts" + }, + { + "label": "client.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\client.ts", + "source_location": "L1", + "id": "src_lib_server_db_client_ts", + "community": 43, + "norm_label": "client.ts" + }, + { + "label": "accounts.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\accounts.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_accounts_ts", + "community": 44, + "norm_label": "accounts.ts" + }, + { + "label": "assets.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\assets.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_assets_ts", + "community": 45, + "norm_label": "assets.ts" + }, + { + "label": "checklists.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\checklists.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_checklists_ts", + "community": 46, + "norm_label": "checklists.ts" + }, + { + "label": "decisions.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\decisions.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_decisions_ts", + "community": 47, + "norm_label": "decisions.ts" + }, + { + "label": "documents.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\documents.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_documents_ts", + "community": 48, + "norm_label": "documents.ts" + }, + { + "label": "index.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\index.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_index_ts", + "community": 49, + "norm_label": "index.ts" + }, + { + "label": "maintenance.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\maintenance.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_maintenance_ts", + "community": 50, + "norm_label": "maintenance.ts" + }, + { + "label": "notifications.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\notifications.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_notifications_ts", + "community": 51, + "norm_label": "notifications.ts" + }, + { + "label": "projects.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\projects.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_projects_ts", + "community": 52, + "norm_label": "projects.ts" + }, + { + "label": "properties.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\properties.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_properties_ts", + "community": 53, + "norm_label": "properties.ts" + }, + { + "label": "rooms.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\rooms.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_rooms_ts", + "community": 54, + "norm_label": "rooms.ts" + }, + { + "label": "tenancy.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\tenancy.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_tenancy_ts", + "community": 55, + "norm_label": "tenancy.ts" + }, + { + "label": "wiki.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\wiki.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_wiki_ts", + "community": 56, + "norm_label": "wiki.ts" + }, + { + "label": "_shared.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L1", + "id": "src_lib_server_db_schema_shared_ts", + "community": 15, + "norm_label": "_shared.ts" + }, + { + "label": "pk()", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L81", + "id": "shared_pk", + "community": 15, + "norm_label": "pk()" + }, + { + "label": "fk()", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L82", + "id": "shared_fk", + "community": 15, + "norm_label": "fk()" + }, + { + "label": "createdAt()", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L83", + "id": "shared_createdat", + "community": 15, + "norm_label": "createdat()" + }, + { + "label": "updatedAt()", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L85", + "id": "shared_updatedat", + "community": 15, + "norm_label": "updatedat()" + }, + { + "label": "deletedAt()", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L87", + "id": "shared_deletedat", + "community": 15, + "norm_label": "deletedat()" + }, + { + "label": "slugCol()", + "file_type": "code", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L88", + "id": "shared_slugcol", + "community": 15, + "norm_label": "slugcol()" + }, + { + "label": "email.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L1", + "id": "src_lib_server_notifications_email_ts", + "community": 3, + "norm_label": "email.ts" + }, + { + "label": "isEmailConfigured()", + "file_type": "code", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L6", + "id": "email_isemailconfigured", + "community": 3, + "norm_label": "isemailconfigured()" + }, + { + "label": "getTransport()", + "file_type": "code", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L10", + "id": "email_gettransport", + "community": 3, + "norm_label": "gettransport()" + }, + { + "label": "sendEmail()", + "file_type": "code", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L35", + "id": "email_sendemail", + "community": 3, + "norm_label": "sendemail()" + }, + { + "label": "matrix.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L1", + "id": "src_lib_server_notifications_matrix_ts", + "community": 3, + "norm_label": "matrix.ts" + }, + { + "label": "isMatrixConfigured()", + "file_type": "code", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L3", + "id": "matrix_ismatrixconfigured", + "community": 3, + "norm_label": "ismatrixconfigured()" + }, + { + "label": "buildBodies()", + "file_type": "code", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L11", + "id": "matrix_buildbodies", + "community": 3, + "norm_label": "buildbodies()" + }, + { + "label": "sendMatrixMessage()", + "file_type": "code", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L37", + "id": "matrix_sendmatrixmessage", + "community": 3, + "norm_label": "sendmatrixmessage()" + }, + { + "label": "accounts.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L1", + "id": "src_lib_server_services_accounts_ts", + "community": 4, + "norm_label": "accounts.ts" + }, + { + "label": "assertProperty()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L13", + "id": "accounts_assertproperty", + "community": 4, + "norm_label": "assertproperty()" + }, + { + "label": "listAccounts()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L28", + "id": "accounts_listaccounts", + "community": 4, + "norm_label": "listaccounts()" + }, + { + "label": "createAccount()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L40", + "id": "accounts_createaccount", + "community": 4, + "norm_label": "createaccount()" + }, + { + "label": "updateAccount()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L82", + "id": "accounts_updateaccount", + "community": 4, + "norm_label": "updateaccount()" + }, + { + "label": "deleteAccount()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L117", + "id": "accounts_deleteaccount", + "community": 4, + "norm_label": "deleteaccount()" + }, + { + "label": "asset-types.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L1", + "id": "src_lib_server_services_asset_types_ts", + "community": 11, + "norm_label": "asset-types.ts" + }, + { + "label": "slugifyTypeSlug()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L21", + "id": "asset_types_slugifytypeslug", + "community": 11, + "norm_label": "slugifytypeslug()" + }, + { + "label": "normalizeFieldKey()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L31", + "id": "asset_types_normalizefieldkey", + "community": 11, + "norm_label": "normalizefieldkey()" + }, + { + "label": "loadEditableType()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L44", + "id": "asset_types_loadeditabletype", + "community": 11, + "norm_label": "loadeditabletype()" + }, + { + "label": "createCompanyAssetType()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L58", + "id": "asset_types_createcompanyassettype", + "community": 11, + "norm_label": "createcompanyassettype()" + }, + { + "label": "updateCompanyAssetType()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L83", + "id": "asset_types_updatecompanyassettype", + "community": 11, + "norm_label": "updatecompanyassettype()" + }, + { + "label": "deleteCompanyAssetType()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L100", + "id": "asset_types_deletecompanyassettype", + "community": 11, + "norm_label": "deletecompanyassettype()" + }, + { + "label": "addFieldDef()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L136", + "id": "asset_types_addfielddef", + "community": 11, + "norm_label": "addfielddef()" + }, + { + "label": "updateFieldDef()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L181", + "id": "asset_types_updatefielddef", + "community": 11, + "norm_label": "updatefielddef()" + }, + { + "label": "removeFieldDef()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L230", + "id": "asset_types_removefielddef", + "community": 11, + "norm_label": "removefielddef()" + }, + { + "label": "assets.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L1", + "id": "src_lib_server_services_assets_ts", + "community": 7, + "norm_label": "assets.ts" + }, + { + "label": "loadTypeWithFields()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L58", + "id": "assets_loadtypewithfields", + "community": 7, + "norm_label": "loadtypewithfields()" + }, + { + "label": "validateCustomFields()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L73", + "id": "assets_validatecustomfields", + "community": 7, + "norm_label": "validatecustomfields()" + }, + { + "label": "assertContainer()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L84", + "id": "assets_assertcontainer", + "community": 7, + "norm_label": "assertcontainer()" + }, + { + "label": "createAsset()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L114", + "id": "assets_createasset", + "community": 7, + "norm_label": "createasset()" + }, + { + "label": "updateAsset()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L165", + "id": "assets_updateasset", + "community": 7, + "norm_label": "updateasset()" + }, + { + "label": "moveAsset()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L211", + "id": "assets_moveasset", + "community": 7, + "norm_label": "moveasset()" + }, + { + "label": "softDeleteAsset()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L268", + "id": "assets_softdeleteasset", + "community": 7, + "norm_label": "softdeleteasset()" + }, + { + "label": "appendAssetLog()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L275", + "id": "assets_appendassetlog", + "community": 7, + "norm_label": "appendassetlog()" + }, + { + "label": "listAssets()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L303", + "id": "assets_listassets", + "community": 2, + "norm_label": "listassets()" + }, + { + "label": "checklists.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L1", + "id": "src_lib_server_services_checklists_ts", + "community": 9, + "norm_label": "checklists.ts" + }, + { + "label": "listTemplates()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L16", + "id": "checklists_listtemplates", + "community": 9, + "norm_label": "listtemplates()" + }, + { + "label": "getTemplate()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L38", + "id": "checklists_gettemplate", + "community": 9, + "norm_label": "gettemplate()" + }, + { + "label": "createTemplate()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L56", + "id": "checklists_createtemplate", + "community": 9, + "norm_label": "createtemplate()" + }, + { + "label": "updateTemplate()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L74", + "id": "checklists_updatetemplate", + "community": 9, + "norm_label": "updatetemplate()" + }, + { + "label": "deleteTemplate()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L88", + "id": "checklists_deletetemplate", + "community": 9, + "norm_label": "deletetemplate()" + }, + { + "label": "addTemplateItem()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L94", + "id": "checklists_addtemplateitem", + "community": 9, + "norm_label": "addtemplateitem()" + }, + { + "label": "removeTemplateItem()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L111", + "id": "checklists_removetemplateitem", + "community": 9, + "norm_label": "removetemplateitem()" + }, + { + "label": "instantiateChecklist()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L123", + "id": "checklists_instantiatechecklist", + "community": 9, + "norm_label": "instantiatechecklist()" + }, + { + "label": "getInstance()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L180", + "id": "checklists_getinstance", + "community": 9, + "norm_label": "getinstance()" + }, + { + "label": "setItemDone()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L201", + "id": "checklists_setitemdone", + "community": 9, + "norm_label": "setitemdone()" + }, + { + "label": "completeInstance()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L222", + "id": "checklists_completeinstance", + "community": 9, + "norm_label": "completeinstance()" + }, + { + "label": "listInstancesForScope()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L238", + "id": "checklists_listinstancesforscope", + "community": 9, + "norm_label": "listinstancesforscope()" + }, + { + "label": "companies.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L1", + "id": "src_lib_server_services_companies_ts", + "community": 20, + "norm_label": "companies.ts" + }, + { + "label": "slugify()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L5", + "id": "companies_slugify", + "community": 20, + "norm_label": "slugify()" + }, + { + "label": "getCompany()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L15", + "id": "companies_getcompany", + "community": 20, + "norm_label": "getcompany()" + }, + { + "label": "updateCompany()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L24", + "id": "companies_updatecompany", + "community": 20, + "norm_label": "updatecompany()" + }, + { + "label": "createCompanyWithAdmin()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L39", + "id": "companies_createcompanywithadmin", + "community": 20, + "norm_label": "createcompanywithadmin()" + }, + { + "label": "decisions.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L1", + "id": "src_lib_server_services_decisions_ts", + "community": 2, + "norm_label": "decisions.ts" + }, + { + "label": "createDecision()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L24", + "id": "decisions_createdecision", + "community": 2, + "norm_label": "createdecision()" + }, + { + "label": "decisionScopeLink()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L74", + "id": "decisions_decisionscopelink", + "community": 2, + "norm_label": "decisionscopelink()" + }, + { + "label": "listDecisionsForScope()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L88", + "id": "decisions_listdecisionsforscope", + "community": 2, + "norm_label": "listdecisionsforscope()" + }, + { + "label": "softDeleteDecision()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L120", + "id": "decisions_softdeletedecision", + "community": 2, + "norm_label": "softdeletedecision()" + }, + { + "label": "documents.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L1", + "id": "src_lib_server_services_documents_ts", + "community": 1, + "norm_label": "documents.ts" + }, + { + "label": "assertScope()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L20", + "id": "documents_assertscope", + "community": 1, + "norm_label": "assertscope()" + }, + { + "label": "uploadDocument()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L47", + "id": "documents_uploaddocument", + "community": 1, + "norm_label": "uploaddocument()" + }, + { + "label": "listDocumentsForScope()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L75", + "id": "documents_listdocumentsforscope", + "community": 1, + "norm_label": "listdocumentsforscope()" + }, + { + "label": "getDocument()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L93", + "id": "documents_getdocument", + "community": 1, + "norm_label": "getdocument()" + }, + { + "label": "deleteDocument()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L102", + "id": "documents_deletedocument", + "community": 1, + "norm_label": "deletedocument()" + }, + { + "label": "signedUrlForDocument()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L113", + "id": "documents_signedurlfordocument", + "community": 1, + "norm_label": "signedurlfordocument()" + }, + { + "label": "maintenance.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L1", + "id": "src_lib_server_services_maintenance_ts", + "community": 8, + "norm_label": "maintenance.ts" + }, + { + "label": "addInterval()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L19", + "id": "maintenance_addinterval", + "community": 8, + "norm_label": "addinterval()" + }, + { + "label": "assertAsset()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L34", + "id": "maintenance_assertasset", + "community": 8, + "norm_label": "assertasset()" + }, + { + "label": "createSchedule()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L59", + "id": "maintenance_createschedule", + "community": 8, + "norm_label": "createschedule()" + }, + { + "label": "listSchedulesForAsset()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L99", + "id": "maintenance_listschedulesforasset", + "community": 8, + "norm_label": "listschedulesforasset()" + }, + { + "label": "getSchedule()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L108", + "id": "maintenance_getschedule", + "community": 8, + "norm_label": "getschedule()" + }, + { + "label": "setScheduleActive()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L121", + "id": "maintenance_setscheduleactive", + "community": 8, + "norm_label": "setscheduleactive()" + }, + { + "label": "deleteSchedule()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L134", + "id": "maintenance_deleteschedule", + "community": 8, + "norm_label": "deleteschedule()" + }, + { + "label": "recordUsageReading()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L142", + "id": "maintenance_recordusagereading", + "community": 8, + "norm_label": "recordusagereading()" + }, + { + "label": "latestUsageReading()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L167", + "id": "maintenance_latestusagereading", + "community": 8, + "norm_label": "latestusagereading()" + }, + { + "label": "recordMaintenanceEvent()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L201", + "id": "maintenance_recordmaintenanceevent", + "community": 8, + "norm_label": "recordmaintenanceevent()" + }, + { + "label": "listEventsForAsset()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L285", + "id": "maintenance_listeventsforasset", + "community": 8, + "norm_label": "listeventsforasset()" + }, + { + "label": "listUsageReadingsForAsset()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L305", + "id": "maintenance_listusagereadingsforasset", + "community": 8, + "norm_label": "listusagereadingsforasset()" + }, + { + "label": "listDueAndOverdue()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L323", + "id": "maintenance_listdueandoverdue", + "community": 8, + "norm_label": "listdueandoverdue()" + }, + { + "label": "countOverdueForCompany()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L352", + "id": "maintenance_countoverdueforcompany", + "community": 8, + "norm_label": "countoverdueforcompany()" + }, + { + "label": "notifications.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L1", + "id": "src_lib_server_services_notifications_ts", + "community": 3, + "norm_label": "notifications.ts" + }, + { + "label": "parseSettings()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L31", + "id": "notifications_parsesettings", + "community": 3, + "norm_label": "parsesettings()" + }, + { + "label": "absoluteLink()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L40", + "id": "notifications_absolutelink", + "community": 3, + "norm_label": "absolutelink()" + }, + { + "label": "notify()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L51", + "id": "notifications_notify", + "community": 3, + "norm_label": "notify()" + }, + { + "label": "fanOutExternal()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L70", + "id": "notifications_fanoutexternal", + "community": 3, + "norm_label": "fanoutexternal()" + }, + { + "label": "renderEmailHtml()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L125", + "id": "notifications_renderemailhtml", + "community": 3, + "norm_label": "renderemailhtml()" + }, + { + "label": "unreadCountForUser()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L144", + "id": "notifications_unreadcountforuser", + "community": 5, + "norm_label": "unreadcountforuser()" + }, + { + "label": "listForUser()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L161", + "id": "notifications_listforuser", + "community": 3, + "norm_label": "listforuser()" + }, + { + "label": "markRead()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L176", + "id": "notifications_markread", + "community": 3, + "norm_label": "markread()" + }, + { + "label": "markAllRead()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L190", + "id": "notifications_markallread", + "community": 3, + "norm_label": "markallread()" + }, + { + "label": "updateUserPrefs()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L211", + "id": "notifications_updateuserprefs", + "community": 3, + "norm_label": "updateuserprefs()" + }, + { + "label": "getUserPrefs()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L229", + "id": "notifications_getuserprefs", + "community": 3, + "norm_label": "getuserprefs()" + }, + { + "label": "projects.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L1", + "id": "src_lib_server_services_projects_ts", + "community": 5, + "norm_label": "projects.ts" + }, + { + "label": "createProject()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L16", + "id": "projects_createproject", + "community": 5, + "norm_label": "createproject()" + }, + { + "label": "listProjects()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L31", + "id": "projects_listprojects", + "community": 5, + "norm_label": "listprojects()" + }, + { + "label": "getProject()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L39", + "id": "projects_getproject", + "community": 5, + "norm_label": "getproject()" + }, + { + "label": "updateProject()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L50", + "id": "projects_updateproject", + "community": 5, + "norm_label": "updateproject()" + }, + { + "label": "softDeleteProject()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L68", + "id": "projects_softdeleteproject", + "community": 5, + "norm_label": "softdeleteproject()" + }, + { + "label": "properties.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L1", + "id": "src_lib_server_services_properties_ts", + "community": 5, + "norm_label": "properties.ts" + }, + { + "label": "createProperty()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L19", + "id": "properties_createproperty", + "community": 5, + "norm_label": "createproperty()" + }, + { + "label": "listProperties()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L37", + "id": "properties_listproperties", + "community": 5, + "norm_label": "listproperties()" + }, + { + "label": "getProperty()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L45", + "id": "properties_getproperty", + "community": 5, + "norm_label": "getproperty()" + }, + { + "label": "updateProperty()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L60", + "id": "properties_updateproperty", + "community": 5, + "norm_label": "updateproperty()" + }, + { + "label": "softDeleteProperty()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L83", + "id": "properties_softdeleteproperty", + "community": 5, + "norm_label": "softdeleteproperty()" + }, + { + "label": "rooms.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L1", + "id": "src_lib_server_services_rooms_ts", + "community": 12, + "norm_label": "rooms.ts" + }, + { + "label": "assertProperty()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L12", + "id": "rooms_assertproperty", + "community": 12, + "norm_label": "assertproperty()" + }, + { + "label": "listFloors()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L29", + "id": "rooms_listfloors", + "community": 12, + "norm_label": "listfloors()" + }, + { + "label": "createFloor()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L38", + "id": "rooms_createfloor", + "community": 12, + "norm_label": "createfloor()" + }, + { + "label": "updateFloor()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L63", + "id": "rooms_updatefloor", + "community": 12, + "norm_label": "updatefloor()" + }, + { + "label": "deleteFloor()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L85", + "id": "rooms_deletefloor", + "community": 4, + "norm_label": "deletefloor()" + }, + { + "label": "listRoomsWithCounts()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L99", + "id": "rooms_listroomswithcounts", + "community": 12, + "norm_label": "listroomswithcounts()" + }, + { + "label": "getRoom()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L129", + "id": "rooms_getroom", + "community": 12, + "norm_label": "getroom()" + }, + { + "label": "createRoom()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L145", + "id": "rooms_createroom", + "community": 12, + "norm_label": "createroom()" + }, + { + "label": "updateRoom()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L188", + "id": "rooms_updateroom", + "community": 12, + "norm_label": "updateroom()" + }, + { + "label": "softDeleteRoom()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L217", + "id": "rooms_softdeleteroom", + "community": 12, + "norm_label": "softdeleteroom()" + }, + { + "label": "assertRoomInProperty()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L239", + "id": "rooms_assertroominproperty", + "community": 7, + "norm_label": "assertroominproperty()" + }, + { + "label": "tasks.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L1", + "id": "src_lib_server_services_tasks_ts", + "community": 13, + "norm_label": "tasks.ts" + }, + { + "label": "assertWorkPackage()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L8", + "id": "tasks_assertworkpackage", + "community": 13, + "norm_label": "assertworkpackage()" + }, + { + "label": "listTasksForWorkPackage()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L24", + "id": "tasks_listtasksforworkpackage", + "community": 13, + "norm_label": "listtasksforworkpackage()" + }, + { + "label": "createTask()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L33", + "id": "tasks_createtask", + "community": 13, + "norm_label": "createtask()" + }, + { + "label": "getTaskWithSubtasks()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L62", + "id": "tasks_gettaskwithsubtasks", + "community": 13, + "norm_label": "gettaskwithsubtasks()" + }, + { + "label": "updateTask()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L79", + "id": "tasks_updatetask", + "community": 13, + "norm_label": "updatetask()" + }, + { + "label": "softDeleteTask()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L125", + "id": "tasks_softdeletetask", + "community": 13, + "norm_label": "softdeletetask()" + }, + { + "label": "addSubtask()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L136", + "id": "tasks_addsubtask", + "community": 13, + "norm_label": "addsubtask()" + }, + { + "label": "toggleSubtask()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L143", + "id": "tasks_togglesubtask", + "community": 13, + "norm_label": "togglesubtask()" + }, + { + "label": "removeSubtask()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L157", + "id": "tasks_removesubtask", + "community": 13, + "norm_label": "removesubtask()" + }, + { + "label": "users.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L1", + "id": "src_lib_server_services_users_ts", + "community": 14, + "norm_label": "users.ts" + }, + { + "label": "listCompanyUsers()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L20", + "id": "users_listcompanyusers", + "community": 14, + "norm_label": "listcompanyusers()" + }, + { + "label": "countAdmins()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L39", + "id": "users_countadmins", + "community": 14, + "norm_label": "countadmins()" + }, + { + "label": "createUserAndAddToCompany()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L67", + "id": "users_createuserandaddtocompany", + "community": 10, + "norm_label": "createuserandaddtocompany()" + }, + { + "label": "updateDisplayName()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L119", + "id": "users_updatedisplayname", + "community": 14, + "norm_label": "updatedisplayname()" + }, + { + "label": "setUserRoleInCompany()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L130", + "id": "users_setuserroleincompany", + "community": 14, + "norm_label": "setuserroleincompany()" + }, + { + "label": "removeUserFromCompany()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L154", + "id": "users_removeuserfromcompany", + "community": 14, + "norm_label": "removeuserfromcompany()" + }, + { + "label": "setUserActive()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L176", + "id": "users_setuseractive", + "community": 14, + "norm_label": "setuseractive()" + }, + { + "label": "resetUserPassword()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L199", + "id": "users_resetuserpassword", + "community": 14, + "norm_label": "resetuserpassword()" + }, + { + "label": "assertMembership()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L212", + "id": "users_assertmembership", + "community": 14, + "norm_label": "assertmembership()" + }, + { + "label": "isSelf()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L223", + "id": "users_isself", + "community": 14, + "norm_label": "isself()" + }, + { + "label": "wiki.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L1", + "id": "src_lib_server_services_wiki_ts", + "community": 0, + "norm_label": "wiki.ts" + }, + { + "label": "slugify()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L8", + "id": "wiki_slugify", + "community": 0, + "norm_label": "slugify()" + }, + { + "label": "scopeIdMatches()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L19", + "id": "wiki_scopeidmatches", + "community": 0, + "norm_label": "scopeidmatches()" + }, + { + "label": "listPagesForScope()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L23", + "id": "wiki_listpagesforscope", + "community": 0, + "norm_label": "listpagesforscope()" + }, + { + "label": "getPageWithCurrentRevision()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L47", + "id": "wiki_getpagewithcurrentrevision", + "community": 0, + "norm_label": "getpagewithcurrentrevision()" + }, + { + "label": "listRevisions()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L80", + "id": "wiki_listrevisions", + "community": 0, + "norm_label": "listrevisions()" + }, + { + "label": "getRevision()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L102", + "id": "wiki_getrevision", + "community": 0, + "norm_label": "getrevision()" + }, + { + "label": "upsertPage()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L125", + "id": "wiki_upsertpage", + "community": 0, + "norm_label": "upsertpage()" + }, + { + "label": "softDeletePage()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L214", + "id": "wiki_softdeletepage", + "community": 0, + "norm_label": "softdeletepage()" + }, + { + "label": "searchPages()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L225", + "id": "wiki_searchpages", + "community": 0, + "norm_label": "searchpages()" + }, + { + "label": "work-packages.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L1", + "id": "src_lib_server_services_work_packages_ts", + "community": 16, + "norm_label": "work-packages.ts" + }, + { + "label": "assertProject()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L5", + "id": "work_packages_assertproject", + "community": 16, + "norm_label": "assertproject()" + }, + { + "label": "listWorkPackagesForProject()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L20", + "id": "work_packages_listworkpackagesforproject", + "community": 16, + "norm_label": "listworkpackagesforproject()" + }, + { + "label": "createWorkPackage()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L47", + "id": "work_packages_createworkpackage", + "community": 16, + "norm_label": "createworkpackage()" + }, + { + "label": "getWorkPackage()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L72", + "id": "work_packages_getworkpackage", + "community": 16, + "norm_label": "getworkpackage()" + }, + { + "label": "updateWorkPackage()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L88", + "id": "work_packages_updateworkpackage", + "community": 16, + "norm_label": "updateworkpackage()" + }, + { + "label": "softDeleteWorkPackage()", + "file_type": "code", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L104", + "id": "work_packages_softdeleteworkpackage", + "community": 16, + "norm_label": "softdeleteworkpackage()" + }, + { + "label": "index.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\index.ts", + "source_location": "L1", + "id": "src_lib_server_storage_index_ts", + "community": 1, + "norm_label": "index.ts" + }, + { + "label": "getStorage()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\index.ts", + "source_location": "L8", + "id": "index_getstorage", + "community": 1, + "norm_label": "getstorage()" + }, + { + "label": "_setStorageForTesting()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\index.ts", + "source_location": "L35", + "id": "index_setstoragefortesting", + "community": 1, + "norm_label": "_setstoragefortesting()" + }, + { + "label": "local.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L1", + "id": "src_lib_server_storage_local_ts", + "community": 1, + "norm_label": "local.ts" + }, + { + "label": "LocalDiskStorage", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L15", + "id": "local_localdiskstorage", + "community": 1, + "norm_label": "localdiskstorage" + }, + { + "label": ".constructor()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L16", + "id": "local_localdiskstorage_constructor", + "community": 1, + "norm_label": ".constructor()" + }, + { + "label": ".resolve()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L22", + "id": "local_localdiskstorage_resolve", + "community": 1, + "norm_label": ".resolve()" + }, + { + "label": ".put()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L29", + "id": "local_localdiskstorage_put", + "community": 1, + "norm_label": ".put()" + }, + { + "label": ".get()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L67", + "id": "local_localdiskstorage_get", + "community": 1, + "norm_label": ".get()" + }, + { + "label": ".head()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L77", + "id": "local_localdiskstorage_head", + "community": 1, + "norm_label": ".head()" + }, + { + "label": ".delete()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L82", + "id": "local_localdiskstorage_delete", + "community": 1, + "norm_label": ".delete()" + }, + { + "label": ".generateKey()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L88", + "id": "local_localdiskstorage_generatekey", + "community": 1, + "norm_label": ".generatekey()" + }, + { + "label": ".getSignedUrl()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L92", + "id": "local_localdiskstorage_getsignedurl", + "community": 1, + "norm_label": ".getsignedurl()" + }, + { + "label": ".verifySignedUrl()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L108", + "id": "local_localdiskstorage_verifysignedurl", + "community": 1, + "norm_label": ".verifysignedurl()" + }, + { + "label": "s3.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L1", + "id": "src_lib_server_storage_s3_ts", + "community": 1, + "norm_label": "s3.ts" + }, + { + "label": "S3Storage", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L30", + "id": "s3_s3storage", + "community": 1, + "norm_label": "s3storage" + }, + { + "label": ".constructor()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L34", + "id": "s3_s3storage_constructor", + "community": 1, + "norm_label": ".constructor()" + }, + { + "label": ".generateKey()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L50", + "id": "s3_s3storage_generatekey", + "community": 1, + "norm_label": ".generatekey()" + }, + { + "label": ".put()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L54", + "id": "s3_s3storage_put", + "community": 1, + "norm_label": ".put()" + }, + { + "label": ".get()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L77", + "id": "s3_s3storage_get", + "community": 1, + "norm_label": ".get()" + }, + { + "label": ".head()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L89", + "id": "s3_s3storage_head", + "community": 1, + "norm_label": ".head()" + }, + { + "label": ".delete()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L99", + "id": "s3_s3storage_delete", + "community": 4, + "norm_label": ".delete()" + }, + { + "label": ".getSignedUrl()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L103", + "id": "s3_s3storage_getsignedurl", + "community": 1, + "norm_label": ".getsignedurl()" + }, + { + "label": "streamToBuffer()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L115", + "id": "s3_streamtobuffer", + "community": 1, + "norm_label": "streamtobuffer()" + }, + { + "label": "types.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\types.ts", + "source_location": "L1", + "id": "src_lib_server_storage_types_ts", + "community": 1, + "norm_label": "types.ts" + }, + { + "label": "generateStorageKey()", + "file_type": "code", + "source_file": "src\\lib\\server\\storage\\types.ts", + "source_location": "L40", + "id": "types_generatestoragekey", + "community": 1, + "norm_label": "generatestoragekey()" + }, + { + "label": "custom-fields.ts", + "file_type": "code", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L1", + "id": "src_lib_server_validation_custom_fields_ts", + "community": 7, + "norm_label": "custom-fields.ts" + }, + { + "label": "validatorFor()", + "file_type": "code", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L24", + "id": "custom_fields_validatorfor", + "community": 7, + "norm_label": "validatorfor()" + }, + { + "label": "buildCustomFieldsSchema()", + "file_type": "code", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L70", + "id": "custom_fields_buildcustomfieldsschema", + "community": 7, + "norm_label": "buildcustomfieldsschema()" + }, + { + "label": "getCachedCustomFieldsSchema()", + "file_type": "code", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L99", + "id": "custom_fields_getcachedcustomfieldsschema", + "community": 7, + "norm_label": "getcachedcustomfieldsschema()" + }, + { + "label": "clearCustomFieldsCache()", + "file_type": "code", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L111", + "id": "custom_fields_clearcustomfieldscache", + "community": 7, + "norm_label": "clearcustomfieldscache()" + }, + { + "label": "email.ts", + "file_type": "code", + "source_file": "src\\lib\\utils\\email.ts", + "source_location": "L1", + "id": "src_lib_utils_email_ts", + "community": 10, + "norm_label": "email.ts" + }, + { + "label": "normalizeEmail()", + "file_type": "code", + "source_file": "src\\lib\\utils\\email.ts", + "source_location": "L1", + "id": "email_normalizeemail", + "community": 10, + "norm_label": "normalizeemail()" + }, + { + "label": "+error.svelte", + "file_type": "code", + "source_file": "src\\routes\\+error.svelte", + "source_location": "L1", + "id": "src_routes_error_svelte", + "community": 57, + "norm_label": "+error.svelte" + }, + { + "label": "+layout.svelte", + "file_type": "code", + "source_file": "src\\routes\\+layout.svelte", + "source_location": "L1", + "id": "src_routes_layout_svelte", + "community": 58, + "norm_label": "+layout.svelte" + }, + { + "label": "+layout.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\+layout.server.ts", + "source_location": "L1", + "id": "src_routes_app_layout_server_ts", + "community": 5, + "norm_label": "+layout.server.ts" + }, + { + "label": "load()", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", + "source_location": "L5", + "id": "layout_server_load", + "community": 5, + "norm_label": "load()" + }, + { + "label": "+layout.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\+layout.svelte", + "source_location": "L1", + "id": "src_routes_app_layout_svelte", + "community": 59, + "norm_label": "+layout.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "load()", + "file_type": "code", + "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", + "source_location": "L22", + "id": "page_server_load", + "community": 0, + "norm_label": "load()" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_page_svelte", + "community": 60, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_admin_asset_types_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_admin_asset_types_page_svelte", + "community": 61, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\new\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_admin_asset_types_new_page_server_ts", + "community": 62, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\new\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_admin_asset_types_new_page_svelte", + "community": 63, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_admin_asset_types_id_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "parseEnumValues()", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", + "source_location": "L69", + "id": "page_server_parseenumvalues", + "community": 0, + "norm_label": "parseenumvalues()" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_admin_asset_types_id_page_svelte", + "community": 64, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_admin_company_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "parseSettings()", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", + "source_location": "L19", + "id": "page_server_parsesettings", + "community": 0, + "norm_label": "parsesettings()" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\company\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_admin_company_page_svelte", + "community": 65, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_admin_company_new_page_server_ts", + "community": 66, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\company\\new\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_admin_company_new_page_svelte", + "community": 67, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_admin_users_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\users\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_admin_users_page_svelte", + "community": 68, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_admin_users_new_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_admin_users_new_page_svelte", + "community": 69, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_page_svelte", + "community": 70, + "norm_label": "+page.svelte" + }, + { + "label": "+server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_export_csv_server_ts", + "community": 2, + "norm_label": "+server.ts" + }, + { + "label": "GET()", + "file_type": "code", + "source_file": "src\\routes\\api\\qr\\+server.ts", + "source_location": "L10", + "id": "server_get", + "community": 2, + "norm_label": "get()" + }, + { + "label": "today()", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", + "source_location": "L38", + "id": "server_today", + "community": 2, + "norm_label": "today()" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_new_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\new\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_new_page_svelte", + "community": 71, + "norm_label": "+page.svelte" + }, + { + "label": "+layout.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_layout_server_ts", + "community": 5, + "norm_label": "+layout.server.ts" + }, + { + "label": "+layout.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_layout_svelte", + "community": 72, + "norm_label": "+layout.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_page_server_ts", + "community": 21, + "norm_label": "+page.server.ts" + }, + { + "label": "e2n()", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", + "source_location": "L19", + "id": "page_server_e2n", + "community": 21, + "norm_label": "e2n()" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_page_svelte", + "community": 73, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_documents_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_documents_page_svelte", + "community": 74, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_history_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_history_page_svelte", + "community": 75, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_label_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_label_page_svelte", + "community": 76, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_logs_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_logs_page_svelte", + "community": 77, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_maintenance_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_maintenance_page_svelte", + "community": 78, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_maintenance_events_eventid_page_svelte", + "community": 79, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_assets_id_move_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_assets_id_move_page_svelte", + "community": 80, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_checklists_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\checklists\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_checklists_page_svelte", + "community": 81, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_checklists_id_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_checklists_id_page_svelte", + "community": 82, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_maintenance_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\maintenance\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_maintenance_page_svelte", + "community": 83, + "norm_label": "+page.svelte" + }, + { + "label": "+server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", + "source_location": "L1", + "id": "src_routes_app_maintenance_export_csv_server_ts", + "community": 2, + "norm_label": "+server.ts" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_notifications_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\notifications\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_notifications_page_svelte", + "community": 84, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_page_svelte", + "community": 85, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_new_page_server_ts", + "community": 21, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\new\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_new_page_svelte", + "community": 86, + "norm_label": "+page.svelte" + }, + { + "label": "+layout.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_layout_server_ts", + "community": 5, + "norm_label": "+layout.server.ts" + }, + { + "label": "+layout.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_layout_svelte", + "community": 87, + "norm_label": "+layout.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_page_server_ts", + "community": 21, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_page_svelte", + "community": 88, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_assets_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_assets_page_svelte", + "community": 89, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_decisions_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_decisions_page_svelte", + "community": 90, + "norm_label": "+page.svelte" + }, + { + "label": "+server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_decisions_export_csv_server_ts", + "community": 2, + "norm_label": "+server.ts" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_documents_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_documents_page_svelte", + "community": 91, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_page_svelte", + "community": 92, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_new_page_server_ts", + "community": 93, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_new_page_svelte", + "community": 94, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_slug_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_slug_page_svelte", + "community": 95, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_slug_edit_page_svelte", + "community": 96, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_slug_history_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_slug_history_page_svelte", + "community": 97, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_svelte", + "community": 98, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_work_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_work_page_svelte", + "community": 99, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_work_wpid_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_work_wpid_page_svelte", + "community": 100, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_projects_id_work_wpid_taskid_page_svelte", + "community": 101, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_properties_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_properties_page_svelte", + "community": 102, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_properties_new_page_server_ts", + "community": 24, + "norm_label": "+page.server.ts" + }, + { + "label": "emptyToNull()", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", + "source_location": "L18", + "id": "page_server_emptytonull", + "community": 24, + "norm_label": "emptytonull()" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\new\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_properties_new_page_svelte", + "community": 103, + "norm_label": "+page.svelte" + }, + { + "label": "+layout.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", + "source_location": "L1", + "id": "src_routes_app_properties_id_layout_server_ts", + "community": 5, + "norm_label": "+layout.server.ts" + }, + { + "label": "+layout.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.svelte", + "source_location": "L1", + "id": "src_routes_app_properties_id_layout_svelte", + "community": 104, + "norm_label": "+layout.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_properties_id_page_server_ts", + "community": 21, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_properties_id_page_svelte", + "community": 105, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_properties_id_accounts_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_properties_id_accounts_page_svelte", + "community": 106, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_properties_id_assets_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_properties_id_assets_page_svelte", + "community": 107, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_properties_id_documents_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_properties_id_documents_page_svelte", + "community": 108, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_properties_id_rooms_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_properties_id_rooms_page_svelte", + "community": 109, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_settings_notifications_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_settings_notifications_page_svelte", + "community": 110, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_wiki_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_wiki_page_svelte", + "community": 111, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\new\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_wiki_new_page_server_ts", + "community": 112, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\new\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_wiki_new_page_svelte", + "community": 113, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_wiki_slug_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_wiki_slug_page_svelte", + "community": 114, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_wiki_slug_edit_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_wiki_slug_edit_page_svelte", + "community": 115, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_wiki_slug_history_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_wiki_slug_history_page_svelte", + "community": 116, + "norm_label": "+page.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.svelte", + "source_location": "L1", + "id": "src_routes_app_wiki_slug_revisions_rev_page_svelte", + "community": 117, + "norm_label": "+page.svelte" + }, + { + "label": "+layout.svelte", + "file_type": "code", + "source_file": "src\\routes\\(auth)\\+layout.svelte", + "source_location": "L1", + "id": "src_routes_auth_layout_svelte", + "community": 118, + "norm_label": "+layout.svelte" + }, + { + "label": "+page.server.ts", + "file_type": "code", + "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", + "source_location": "L1", + "id": "src_routes_auth_login_page_server_ts", + "community": 0, + "norm_label": "+page.server.ts" + }, + { + "label": "+page.svelte", + "file_type": "code", + "source_file": "src\\routes\\(auth)\\login\\+page.svelte", + "source_location": "L1", + "id": "src_routes_auth_login_page_svelte", + "community": 119, + "norm_label": "+page.svelte" + }, + { + "label": "+server.ts", + "file_type": "code", + "source_file": "src\\routes\\api\\documents\\+server.ts", + "source_location": "L1", + "id": "src_routes_api_documents_server_ts", + "community": 1, + "norm_label": "+server.ts" + }, + { + "label": "POST()", + "file_type": "code", + "source_file": "src\\routes\\switch-company\\+server.ts", + "source_location": "L8", + "id": "server_post", + "community": 1, + "norm_label": "post()" + }, + { + "label": "+server.ts", + "file_type": "code", + "source_file": "src\\routes\\api\\files\\+server.ts", + "source_location": "L1", + "id": "src_routes_api_files_server_ts", + "community": 2, + "norm_label": "+server.ts" + }, + { + "label": "+server.ts", + "file_type": "code", + "source_file": "src\\routes\\api\\qr\\+server.ts", + "source_location": "L1", + "id": "src_routes_api_qr_server_ts", + "community": 2, + "norm_label": "+server.ts" + }, + { + "label": "clamp()", + "file_type": "code", + "source_file": "src\\routes\\api\\qr\\+server.ts", + "source_location": "L42", + "id": "server_clamp", + "community": 2, + "norm_label": "clamp()" + }, + { + "label": "+server.ts", + "file_type": "code", + "source_file": "src\\routes\\logout\\+server.ts", + "source_location": "L1", + "id": "src_routes_logout_server_ts", + "community": 4, + "norm_label": "+server.ts" + }, + { + "label": "handleLogout()", + "file_type": "code", + "source_file": "src\\routes\\logout\\+server.ts", + "source_location": "L5", + "id": "server_handlelogout", + "community": 4, + "norm_label": "handlelogout()" + }, + { + "label": "+server.ts", + "file_type": "code", + "source_file": "src\\routes\\switch-company\\+server.ts", + "source_location": "L1", + "id": "src_routes_switch_company_server_ts", + "community": 1, + "norm_label": "+server.ts" + }, + { + "label": "buildfor_life_ops", + "file_type": "document", + "source_file": "README.md", + "source_location": "L1-L3", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_buildfor_life_ops", + "community": 6, + "norm_label": "buildfor_life_ops" + }, + { + "label": "buildfor_life_budget (sibling)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L4,L178", + "source_url": "https://git.b4l.co.th/B4L/buildfor_life_budget", + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_buildfor_life_budget", + "community": 6, + "norm_label": "buildfor_life_budget (sibling)" + }, + { + "label": "buildfor_life_repair (sibling)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L4,L179", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_buildfor_life_repair", + "community": 6, + "norm_label": "buildfor_life_repair (sibling)" + }, + { + "label": "SvelteKit 5 (adapter-node)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L8", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_stack_sveltekit5", + "community": 6, + "norm_label": "sveltekit 5 (adapter-node)" + }, + { + "label": "Tailwind v4 + @theme inline tokens", + "file_type": "document", + "source_file": "README.md", + "source_location": "L9", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_stack_tailwind_v4", + "community": 6, + "norm_label": "tailwind v4 + @theme inline tokens" + }, + { + "label": "PostgreSQL 16+ via Drizzle ORM + Zod", + "file_type": "document", + "source_file": "README.md", + "source_location": "L10", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_stack_postgres_drizzle", + "community": 6, + "norm_label": "postgresql 16+ via drizzle orm + zod" + }, + { + "label": "Argon2id sessions (@node-rs/argon2 + @oslojs/crypto)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L11", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_auth_argon2id", + "community": 6, + "norm_label": "argon2id sessions (@node-rs/argon2 + @oslojs/crypto)" + }, + { + "label": "EasyMDE markdown editor", + "file_type": "document", + "source_file": "README.md", + "source_location": "L12", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_easymde", + "community": 6, + "norm_label": "easymde markdown editor" + }, + { + "label": "Sharp image thumbnails", + "file_type": "document", + "source_file": "README.md", + "source_location": "L12", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_sharp", + "community": 6, + "norm_label": "sharp image thumbnails" + }, + { + "label": "StorageAdapter interface", + "file_type": "document", + "source_file": "README.md", + "source_location": "L13", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_storage_adapter", + "community": 17, + "norm_label": "storageadapter interface" + }, + { + "label": "LocalDiskStorage", + "file_type": "document", + "source_file": "README.md", + "source_location": "L13,L143", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_local_disk_storage", + "community": 17, + "norm_label": "localdiskstorage" + }, + { + "label": "S3Storage (future)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L144", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_s3_storage", + "community": 17, + "norm_label": "s3storage (future)" + }, + { + "label": ".env configuration", + "file_type": "document", + "source_file": "README.md", + "source_location": "L29-L44", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_env_dotenv", + "community": 25, + "norm_label": ".env configuration" + }, + { + "label": "npm run create-user script", + "file_type": "document", + "source_file": "README.md", + "source_location": "L59-L66,L122", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_create_user_script", + "community": 26, + "norm_label": "npm run create-user script" + }, + { + "label": "npm run db:migrate", + "file_type": "document", + "source_file": "README.md", + "source_location": "L54,L86", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_db_migrate", + "community": 18, + "norm_label": "npm run db:migrate" + }, + { + "label": "npm run db:generate", + "file_type": "document", + "source_file": "README.md", + "source_location": "L85", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_db_generate", + "community": 18, + "norm_label": "npm run db:generate" + }, + { + "label": "npm run db:push (dev only)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L87", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_db_push", + "community": 18, + "norm_label": "npm run db:push (dev only)" + }, + { + "label": "npm run db:studio (Drizzle Studio)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L88", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_db_studio", + "community": 18, + "norm_label": "npm run db:studio (drizzle studio)" + }, + { + "label": "npm run db:seed", + "file_type": "document", + "source_file": "README.md", + "source_location": "L89", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_db_seed", + "community": 120, + "norm_label": "npm run db:seed" + }, + { + "label": "npm run validate (check + build)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L84", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_validate_script", + "community": 121, + "norm_label": "npm run validate (check + build)" + }, + { + "label": "Auth model (sessions + hashed cookies)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L132-L138", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_auth_model", + "community": 19, + "norm_label": "auth model (sessions + hashed cookies)" + }, + { + "label": "Sliding session renewal (30d/15d)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L135", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_sliding_renewal", + "community": 19, + "norm_label": "sliding session renewal (30d/15d)" + }, + { + "label": "SHA-256 cookie hashing before DB lookup", + "file_type": "document", + "source_file": "README.md", + "source_location": "L134", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_sha256_cookie_hash", + "community": 19, + "norm_label": "sha-256 cookie hashing before db lookup" + }, + { + "label": "company_users role mapping", + "file_type": "document", + "source_file": "README.md", + "source_location": "L138", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_company_users", + "community": 19, + "norm_label": "company_users role mapping" + }, + { + "label": "Storage model (opaque storage_key)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L141-L144", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_storage_model", + "community": 17, + "norm_label": "storage model (opaque storage_key)" + }, + { + "label": "HMAC-signed short-lived file URLs", + "file_type": "document", + "source_file": "README.md", + "source_location": "L143", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_hmac_signed_urls", + "community": 17, + "norm_label": "hmac-signed short-lived file urls" + }, + { + "label": "/api/files route (signature verification + streaming)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L120,L143", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_api_files_route", + "community": 17, + "norm_label": "/api/files route (signature verification + streaming)" + }, + { + "label": "(app) route group (authed shell)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L113-L116,L137", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_layout_app_group", + "community": 19, + "norm_label": "(app) route group (authed shell)" + }, + { + "label": "(auth) route group (login shell)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L117-L118", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_layout_auth_group", + "community": 122, + "norm_label": "(auth) route group (login shell)" + }, + { + "label": "hooks.server.ts (session validation)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L99", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_hooks_server", + "community": 19, + "norm_label": "hooks.server.ts (session validation)" + }, + { + "label": "env.ts (Zod-validated process.env)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L108", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_env_ts", + "community": 25, + "norm_label": "env.ts (zod-validated process.env)" + }, + { + "label": "src/lib/server/db/schema/", + "file_type": "document", + "source_file": "README.md", + "source_location": "L105-L106", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_db_schema_dir", + "community": 26, + "norm_label": "src/lib/server/db/schema/" + }, + { + "label": "Phase 0: scaffold (shipped)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L150", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_roadmap_phase0", + "community": 123, + "norm_label": "phase 0: scaffold (shipped)" + }, + { + "label": "Phase 1: Properties + Assets", + "file_type": "document", + "source_file": "README.md", + "source_location": "L151", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_roadmap_phase1", + "community": 22, + "norm_label": "phase 1: properties + assets" + }, + { + "label": "Phase 2: Checklists + maintenance", + "file_type": "document", + "source_file": "README.md", + "source_location": "L152", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_roadmap_phase2", + "community": 124, + "norm_label": "phase 2: checklists + maintenance" + }, + { + "label": "Phase 3: Projects + structured decisions", + "file_type": "document", + "source_file": "README.md", + "source_location": "L153", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_roadmap_phase3", + "community": 28, + "norm_label": "phase 3: projects + structured decisions" + }, + { + "label": "Phase 4: Wiki + FTS", + "file_type": "document", + "source_file": "README.md", + "source_location": "L154", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_roadmap_phase4", + "community": 6, + "norm_label": "phase 4: wiki + fts" + }, + { + "label": "Phase 5: QR, notifications, S3", + "file_type": "document", + "source_file": "README.md", + "source_location": "L155", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_roadmap_phase5", + "community": 17, + "norm_label": "phase 5: qr, notifications, s3" + }, + { + "label": "Decision: UUID v7 primary keys", + "file_type": "document", + "source_file": "README.md", + "source_location": "L161", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_uuidv7", + "community": 125, + "norm_label": "decision: uuid v7 primary keys" + }, + { + "label": "Decision: timestamptz UTC everywhere", + "file_type": "document", + "source_file": "README.md", + "source_location": "L162", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_timestamptz", + "community": 126, + "norm_label": "decision: timestamptz utc everywhere" + }, + { + "label": "Decision: soft delete (deleted_at)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L163", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_soft_delete", + "community": 127, + "norm_label": "decision: soft delete (deleted_at)" + }, + { + "label": "Decision: numeric(18,4) + char(3) currency", + "file_type": "document", + "source_file": "README.md", + "source_location": "L164", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_money_type", + "community": 128, + "norm_label": "decision: numeric(18,4) + char(3) currency" + }, + { + "label": "Decision: JSONB custom fields + asset_field_defs", + "file_type": "document", + "source_file": "README.md", + "source_location": "L165", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_jsonb_custom_fields", + "community": 22, + "norm_label": "decision: jsonb custom fields + asset_field_defs" + }, + { + "label": "Decision: XOR asset location (project XOR property)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L166", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_xor_location", + "community": 27, + "norm_label": "decision: xor asset location (project xor property)" + }, + { + "label": "Decision: asset_location_history (movable assets)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L167", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_asset_history", + "community": 27, + "norm_label": "decision: asset_location_history (movable assets)" + }, + { + "label": "Decision: immutable custom-field keys", + "file_type": "document", + "source_file": "README.md", + "source_location": "L168", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_immutable_keys", + "community": 22, + "norm_label": "decision: immutable custom-field keys" + }, + { + "label": "Decision: decisions scoped to project/property/asset/work_package", + "file_type": "document", + "source_file": "README.md", + "source_location": "L169", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_decision_scope", + "community": 28, + "norm_label": "decision: decisions scoped to project/property/asset/work_package" + }, + { + "label": "Decision: company default currency in settings_json", + "file_type": "document", + "source_file": "README.md", + "source_location": "L170", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_currency_default", + "community": 129, + "norm_label": "decision: company default currency in settings_json" + }, + { + "label": "Decision: tabs = nested routes (not query-string)", + "file_type": "document", + "source_file": "README.md", + "source_location": "L171", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_tabs_routes", + "community": 130, + "norm_label": "decision: tabs = nested routes (not query-string)" + }, + { + "label": "Decision: localStorage['theme'] key shared across siblings", + "file_type": "document", + "source_file": "README.md", + "source_location": "L172", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "readme_decision_theme_key", + "community": 6, + "norm_label": "decision: localstorage['theme'] key shared across siblings" + }, + { + "label": "Drizzle migrations directory", + "file_type": "document", + "source_file": "drizzle/README.md", + "source_location": "L1-L5", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "drizzle_readme_migrations", + "community": 18, + "norm_label": "drizzle migrations directory" + }, + { + "label": "Review SQL after generate: enum/index/custom_fields", + "file_type": "document", + "source_file": "drizzle/README.md", + "source_location": "L13-L18", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "drizzle_readme_review_rationale", + "community": 18, + "norm_label": "review sql after generate: enum/index/custom_fields" + }, + { + "label": "Use CONCURRENTLY on large-table index changes", + "file_type": "document", + "source_file": "drizzle/README.md", + "source_location": "L16", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "drizzle_readme_concurrently_note", + "community": 18, + "norm_label": "use concurrently on large-table index changes" + }, + { + "label": "Immutable-key policy reference", + "file_type": "document", + "source_file": "drizzle/README.md", + "source_location": "L17-L18", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "drizzle_readme_immutable_key_ref", + "community": 22, + "norm_label": "immutable-key policy reference" + }, + { + "label": "app.html root document", + "file_type": "code", + "source_file": "src/app.html", + "source_location": "L1-L20", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "apphtml_root", + "community": 6, + "norm_label": "app.html root document" + }, + { + "label": "Dark-mode bootstrap inline script (localStorage['theme'])", + "file_type": "code", + "source_file": "src/app.html", + "source_location": "L7-L14", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "apphtml_theme_bootstrap", + "community": 6, + "norm_label": "dark-mode bootstrap inline script (localstorage['theme'])" + }, + { + "label": "%sveltekit.head% / %sveltekit.body% placeholders", + "file_type": "code", + "source_file": "src/app.html", + "source_location": "L15,L18", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "apphtml_sveltekit_placeholders", + "community": 6, + "norm_label": "%sveltekit.head% / %sveltekit.body% placeholders" + }, + { + "label": "Tailwind body classes with dark: variants", + "file_type": "code", + "source_file": "src/app.html", + "source_location": "L17", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "apphtml_tailwind_body_classes", + "community": 6, + "norm_label": "tailwind body classes with dark: variants" + }, + { + "label": "data-sveltekit-preload-data=hover", + "file_type": "code", + "source_file": "src/app.html", + "source_location": "L17", + "source_url": null, + "captured_at": null, + "author": null, + "contributor": null, + "id": "apphtml_preload_hover", + "community": 6, + "norm_label": "data-sveltekit-preload-data=hover" + } + ], + "links": [ + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\create-user.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "scripts_create_user_ts", + "_tgt": "create_user_slugify", + "source": "scripts_create_user_ts", + "target": "create_user_slugify", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\create-user.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "scripts_create_user_ts", + "_tgt": "create_user_stripsurroundingquotes", + "source": "scripts_create_user_ts", + "target": "create_user_stripsurroundingquotes", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\create-user.ts", + "source_location": "L26", + "weight": 1.0, + "_src": "scripts_create_user_ts", + "_tgt": "create_user_readarg", + "source": "scripts_create_user_ts", + "target": "create_user_readarg", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\create-user.ts", + "source_location": "L31", + "weight": 1.0, + "_src": "scripts_create_user_ts", + "_tgt": "create_user_main", + "source": "scripts_create_user_ts", + "target": "create_user_main", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "scripts\\create-user.ts", + "source_location": "L62", + "weight": 1.0, + "_src": "create_user_main", + "_tgt": "create_user_slugify", + "source": "create_user_slugify", + "target": "create_user_main", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "scripts\\create-user.ts", + "source_location": "L28", + "weight": 1.0, + "_src": "create_user_readarg", + "_tgt": "create_user_stripsurroundingquotes", + "source": "create_user_stripsurroundingquotes", + "target": "create_user_readarg", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "scripts\\create-user.ts", + "source_location": "L32", + "weight": 1.0, + "_src": "create_user_main", + "_tgt": "create_user_readarg", + "source": "create_user_readarg", + "target": "create_user_main", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "scripts\\create-user.ts", + "source_location": "L43", + "weight": 1.0, + "_src": "create_user_main", + "_tgt": "email_normalizeemail", + "source": "create_user_main", + "target": "email_normalizeemail" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\diag-user.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "scripts_diag_user_ts", + "_tgt": "diag_user_stripsurroundingquotes", + "source": "scripts_diag_user_ts", + "target": "diag_user_stripsurroundingquotes", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\diag-user.ts", + "source_location": "L18", + "weight": 1.0, + "_src": "scripts_diag_user_ts", + "_tgt": "diag_user_readarg", + "source": "scripts_diag_user_ts", + "target": "diag_user_readarg", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\diag-user.ts", + "source_location": "L23", + "weight": 1.0, + "_src": "scripts_diag_user_ts", + "_tgt": "diag_user_main", + "source": "scripts_diag_user_ts", + "target": "diag_user_main", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "scripts\\diag-user.ts", + "source_location": "L20", + "weight": 1.0, + "_src": "diag_user_readarg", + "_tgt": "diag_user_stripsurroundingquotes", + "source": "diag_user_stripsurroundingquotes", + "target": "diag_user_readarg", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "scripts\\diag-user.ts", + "source_location": "L24", + "weight": 1.0, + "_src": "diag_user_main", + "_tgt": "diag_user_readarg", + "source": "diag_user_readarg", + "target": "diag_user_main", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "scripts\\diag-user.ts", + "source_location": "L32", + "weight": 1.0, + "_src": "diag_user_main", + "_tgt": "email_normalizeemail", + "source": "diag_user_main", + "target": "email_normalizeemail" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L266", + "weight": 1.0, + "_src": "scripts_seed_system_asset_types_ts", + "_tgt": "system_asset_types_upsertsystemtype", + "source": "scripts_seed_system_asset_types_ts", + "target": "system_asset_types_upsertsystemtype", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L306", + "weight": 1.0, + "_src": "scripts_seed_system_asset_types_ts", + "_tgt": "system_asset_types_syncfielddefs", + "source": "scripts_seed_system_asset_types_ts", + "target": "system_asset_types_syncfielddefs", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L364", + "weight": 1.0, + "_src": "scripts_seed_system_asset_types_ts", + "_tgt": "system_asset_types_main", + "source": "scripts_seed_system_asset_types_ts", + "target": "system_asset_types_main", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L368", + "weight": 1.0, + "_src": "system_asset_types_main", + "_tgt": "system_asset_types_upsertsystemtype", + "source": "system_asset_types_upsertsystemtype", + "target": "system_asset_types_main", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L369", + "weight": 1.0, + "_src": "system_asset_types_main", + "_tgt": "system_asset_types_syncfielddefs", + "source": "system_asset_types_syncfielddefs", + "target": "system_asset_types_main", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L326", + "weight": 1.0, + "_src": "system_asset_types_syncfielddefs", + "_tgt": "server_get", + "source": "system_asset_types_syncfielddefs", + "target": "server_get" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "scripts\\seed\\system-asset-types.ts", + "source_location": "L350", + "weight": 1.0, + "_src": "system_asset_types_syncfielddefs", + "_tgt": "s3_s3storage_delete", + "source": "system_asset_types_syncfielddefs", + "target": "s3_s3storage_delete" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\hooks.server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "src_hooks_server_ts", + "_tgt": "hooks_server_handle", + "source": "src_hooks_server_ts", + "target": "hooks_server_handle", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\hooks.server.ts", + "source_location": "L14", + "weight": 1.0, + "_src": "hooks_server_handle", + "_tgt": "server_get", + "source": "hooks_server_handle", + "target": "server_get" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\hooks.server.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "hooks_server_handle", + "_tgt": "session_validatesession", + "source": "hooks_server_handle", + "target": "session_validatesession" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\hooks.server.ts", + "source_location": "L23", + "weight": 1.0, + "_src": "hooks_server_handle", + "_tgt": "session_refreshsession", + "source": "hooks_server_handle", + "target": "session_refreshsession" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\hooks.server.ts", + "source_location": "L33", + "weight": 1.0, + "_src": "hooks_server_handle", + "_tgt": "s3_s3storage_delete", + "source": "hooks_server_handle", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\hooks.server.ts", + "source_location": "L37", + "weight": 1.0, + "_src": "hooks_server_handle", + "_tgt": "local_localdiskstorage_resolve", + "source": "hooks_server_handle", + "target": "local_localdiskstorage_resolve" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\field-types.ts", + "source_location": "L54", + "weight": 1.0, + "_src": "src_lib_field_types_ts", + "_tgt": "field_types_needsenumvalues", + "source": "src_lib_field_types_ts", + "target": "field_types_needsenumvalues", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_lib_server_csv_ts", + "_tgt": "csv_tocsv", + "source": "src_lib_server_csv_ts", + "target": "csv_tocsv", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L18", + "weight": 1.0, + "_src": "src_lib_server_csv_ts", + "_tgt": "csv_tocell", + "source": "src_lib_server_csv_ts", + "target": "csv_tocell", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L26", + "weight": 1.0, + "_src": "src_lib_server_csv_ts", + "_tgt": "csv_escape", + "source": "src_lib_server_csv_ts", + "target": "csv_escape", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\csv.ts", + "source_location": "L31", + "weight": 1.0, + "_src": "src_lib_server_csv_ts", + "_tgt": "csv_csvresponse", + "source": "src_lib_server_csv_ts", + "target": "csv_csvresponse", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", + "source_location": "L22", + "weight": 1.0, + "_src": "server_get", + "_tgt": "csv_tocsv", + "source": "csv_tocsv", + "target": "server_get" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", + "source_location": "L51", + "weight": 1.0, + "_src": "server_get", + "_tgt": "csv_csvresponse", + "source": "csv_csvresponse", + "target": "server_get" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\custom-fields-form.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "src_lib_server_custom_fields_form_ts", + "_tgt": "custom_fields_form_gathercustomfieldsfromform", + "source": "src_lib_server_custom_fields_form_ts", + "target": "custom_fields_form_gathercustomfieldsfromform", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\custom-fields-form.ts", + "source_location": "L23", + "weight": 1.0, + "_src": "custom_fields_form_gathercustomfieldsfromform", + "_tgt": "server_get", + "source": "custom_fields_form_gathercustomfieldsfromform", + "target": "server_get" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\markdown.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "src_lib_server_markdown_ts", + "_tgt": "markdown_html", + "source": "src_lib_server_markdown_ts", + "target": "markdown_html", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\markdown.ts", + "source_location": "L17", + "weight": 1.0, + "_src": "src_lib_server_markdown_ts", + "_tgt": "markdown_escapehtml", + "source": "src_lib_server_markdown_ts", + "target": "markdown_escapehtml", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\markdown.ts", + "source_location": "L26", + "weight": 1.0, + "_src": "src_lib_server_markdown_ts", + "_tgt": "markdown_rendermarkdown", + "source": "src_lib_server_markdown_ts", + "target": "markdown_rendermarkdown", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\markdown.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "markdown_html", + "_tgt": "markdown_escapehtml", + "source": "markdown_html", + "target": "markdown_escapehtml", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L22", + "weight": 1.0, + "_src": "matrix_buildbodies", + "_tgt": "markdown_escapehtml", + "source": "markdown_escapehtml", + "target": "matrix_buildbodies" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", + "source_location": "L14", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "markdown_rendermarkdown", + "source": "markdown_rendermarkdown", + "target": "page_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\guards.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "src_lib_server_auth_guards_ts", + "_tgt": "guards_requirecompany", + "source": "src_lib_server_auth_guards_ts", + "target": "guards_requirecompany", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\guards.ts", + "source_location": "L22", + "weight": 1.0, + "_src": "src_lib_server_auth_guards_ts", + "_tgt": "guards_requireadmin", + "source": "src_lib_server_auth_guards_ts", + "target": "guards_requireadmin", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\guards.ts", + "source_location": "L27", + "weight": 1.0, + "_src": "guards_requireadmin", + "_tgt": "guards_requirecompany", + "source": "guards_requirecompany", + "target": "guards_requireadmin", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", + "source_location": "L29", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "guards_requirecompany", + "source": "guards_requirecompany", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", + "source_location": "L18", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "guards_requireadmin", + "source": "guards_requireadmin", + "target": "page_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "src_lib_server_auth_session_ts", + "_tgt": "session_generatesessiontoken", + "source": "src_lib_server_auth_session_ts", + "target": "session_generatesessiontoken", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L18", + "weight": 1.0, + "_src": "src_lib_server_auth_session_ts", + "_tgt": "session_hashtoken", + "source": "src_lib_server_auth_session_ts", + "target": "session_hashtoken", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L22", + "weight": 1.0, + "_src": "src_lib_server_auth_session_ts", + "_tgt": "session_createsession", + "source": "src_lib_server_auth_session_ts", + "target": "session_createsession", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L45", + "weight": 1.0, + "_src": "src_lib_server_auth_session_ts", + "_tgt": "session_validatesession", + "source": "src_lib_server_auth_session_ts", + "target": "session_validatesession", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L98", + "weight": 1.0, + "_src": "src_lib_server_auth_session_ts", + "_tgt": "session_refreshsession", + "source": "src_lib_server_auth_session_ts", + "target": "session_refreshsession", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L106", + "weight": 1.0, + "_src": "src_lib_server_auth_session_ts", + "_tgt": "session_invalidatesession", + "source": "src_lib_server_auth_session_ts", + "target": "session_invalidatesession", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L110", + "weight": 1.0, + "_src": "src_lib_server_auth_session_ts", + "_tgt": "session_setactivecompany", + "source": "src_lib_server_auth_session_ts", + "target": "session_setactivecompany", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L27", + "weight": 1.0, + "_src": "session_createsession", + "_tgt": "session_hashtoken", + "source": "session_hashtoken", + "target": "session_createsession", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L46", + "weight": 1.0, + "_src": "session_validatesession", + "_tgt": "session_hashtoken", + "source": "session_hashtoken", + "target": "session_validatesession", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\auth\\session.ts", + "source_location": "L107", + "weight": 1.0, + "_src": "session_invalidatesession", + "_tgt": "s3_s3storage_delete", + "source": "session_invalidatesession", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\logout\\+server.ts", + "source_location": "L7", + "weight": 1.0, + "_src": "server_handlelogout", + "_tgt": "session_invalidatesession", + "source": "session_invalidatesession", + "target": "server_handlelogout" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\+layout.server.ts", + "source_location": "L39", + "weight": 1.0, + "_src": "layout_server_load", + "_tgt": "session_setactivecompany", + "source": "session_setactivecompany", + "target": "layout_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\switch-company\\+server.ts", + "source_location": "L23", + "weight": 1.0, + "_src": "server_post", + "_tgt": "session_setactivecompany", + "source": "session_setactivecompany", + "target": "server_post" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L81", + "weight": 1.0, + "_src": "src_lib_server_db_schema_shared_ts", + "_tgt": "shared_pk", + "source": "src_lib_server_db_schema_shared_ts", + "target": "shared_pk", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L82", + "weight": 1.0, + "_src": "src_lib_server_db_schema_shared_ts", + "_tgt": "shared_fk", + "source": "src_lib_server_db_schema_shared_ts", + "target": "shared_fk", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L83", + "weight": 1.0, + "_src": "src_lib_server_db_schema_shared_ts", + "_tgt": "shared_createdat", + "source": "src_lib_server_db_schema_shared_ts", + "target": "shared_createdat", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L85", + "weight": 1.0, + "_src": "src_lib_server_db_schema_shared_ts", + "_tgt": "shared_updatedat", + "source": "src_lib_server_db_schema_shared_ts", + "target": "shared_updatedat", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L87", + "weight": 1.0, + "_src": "src_lib_server_db_schema_shared_ts", + "_tgt": "shared_deletedat", + "source": "src_lib_server_db_schema_shared_ts", + "target": "shared_deletedat", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\db\\schema\\_shared.ts", + "source_location": "L88", + "weight": 1.0, + "_src": "src_lib_server_db_schema_shared_ts", + "_tgt": "shared_slugcol", + "source": "src_lib_server_db_schema_shared_ts", + "target": "shared_slugcol", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_lib_server_notifications_email_ts", + "_tgt": "email_isemailconfigured", + "source": "src_lib_server_notifications_email_ts", + "target": "email_isemailconfigured", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "src_lib_server_notifications_email_ts", + "_tgt": "email_gettransport", + "source": "src_lib_server_notifications_email_ts", + "target": "email_gettransport", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L35", + "weight": 1.0, + "_src": "src_lib_server_notifications_email_ts", + "_tgt": "email_sendemail", + "source": "src_lib_server_notifications_email_ts", + "target": "email_sendemail", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "email_gettransport", + "_tgt": "email_isemailconfigured", + "source": "email_isemailconfigured", + "target": "email_gettransport", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L36", + "weight": 1.0, + "_src": "email_sendemail", + "_tgt": "email_isemailconfigured", + "source": "email_isemailconfigured", + "target": "email_sendemail", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L71", + "weight": 1.0, + "_src": "notifications_fanoutexternal", + "_tgt": "email_isemailconfigured", + "source": "email_isemailconfigured", + "target": "notifications_fanoutexternal" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\email.ts", + "source_location": "L38", + "weight": 1.0, + "_src": "email_sendemail", + "_tgt": "email_gettransport", + "source": "email_gettransport", + "target": "email_sendemail", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L3", + "weight": 1.0, + "_src": "src_lib_server_notifications_matrix_ts", + "_tgt": "matrix_ismatrixconfigured", + "source": "src_lib_server_notifications_matrix_ts", + "target": "matrix_ismatrixconfigured", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L11", + "weight": 1.0, + "_src": "src_lib_server_notifications_matrix_ts", + "_tgt": "matrix_buildbodies", + "source": "src_lib_server_notifications_matrix_ts", + "target": "matrix_buildbodies", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L37", + "weight": 1.0, + "_src": "src_lib_server_notifications_matrix_ts", + "_tgt": "matrix_sendmatrixmessage", + "source": "src_lib_server_notifications_matrix_ts", + "target": "matrix_sendmatrixmessage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L38", + "weight": 1.0, + "_src": "matrix_sendmatrixmessage", + "_tgt": "matrix_ismatrixconfigured", + "source": "matrix_ismatrixconfigured", + "target": "matrix_sendmatrixmessage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L71", + "weight": 1.0, + "_src": "notifications_fanoutexternal", + "_tgt": "matrix_ismatrixconfigured", + "source": "matrix_ismatrixconfigured", + "target": "notifications_fanoutexternal" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\notifications\\matrix.ts", + "source_location": "L40", + "weight": 1.0, + "_src": "matrix_sendmatrixmessage", + "_tgt": "matrix_buildbodies", + "source": "matrix_buildbodies", + "target": "matrix_sendmatrixmessage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L116", + "weight": 1.0, + "_src": "notifications_fanoutexternal", + "_tgt": "matrix_sendmatrixmessage", + "source": "matrix_sendmatrixmessage", + "target": "notifications_fanoutexternal" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L13", + "weight": 1.0, + "_src": "src_lib_server_services_accounts_ts", + "_tgt": "accounts_assertproperty", + "source": "src_lib_server_services_accounts_ts", + "target": "accounts_assertproperty", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L28", + "weight": 1.0, + "_src": "src_lib_server_services_accounts_ts", + "_tgt": "accounts_listaccounts", + "source": "src_lib_server_services_accounts_ts", + "target": "accounts_listaccounts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L40", + "weight": 1.0, + "_src": "src_lib_server_services_accounts_ts", + "_tgt": "accounts_createaccount", + "source": "src_lib_server_services_accounts_ts", + "target": "accounts_createaccount", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L82", + "weight": 1.0, + "_src": "src_lib_server_services_accounts_ts", + "_tgt": "accounts_updateaccount", + "source": "src_lib_server_services_accounts_ts", + "target": "accounts_updateaccount", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L117", + "weight": 1.0, + "_src": "src_lib_server_services_accounts_ts", + "_tgt": "accounts_deleteaccount", + "source": "src_lib_server_services_accounts_ts", + "target": "accounts_deleteaccount", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L32", + "weight": 1.0, + "_src": "accounts_listaccounts", + "_tgt": "accounts_assertproperty", + "source": "accounts_assertproperty", + "target": "accounts_listaccounts", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L50", + "weight": 1.0, + "_src": "accounts_createaccount", + "_tgt": "accounts_assertproperty", + "source": "accounts_assertproperty", + "target": "accounts_createaccount", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", + "source_location": "L34", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "accounts_listaccounts", + "source": "accounts_listaccounts", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\accounts.ts", + "source_location": "L125", + "weight": 1.0, + "_src": "accounts_deleteaccount", + "_tgt": "s3_s3storage_delete", + "source": "accounts_deleteaccount", + "target": "s3_s3storage_delete" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L21", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_slugifytypeslug", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_slugifytypeslug", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L31", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_normalizefieldkey", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_normalizefieldkey", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L44", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_loadeditabletype", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_loadeditabletype", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L58", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_createcompanyassettype", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_createcompanyassettype", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L83", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_updatecompanyassettype", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_updatecompanyassettype", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L100", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_deletecompanyassettype", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_deletecompanyassettype", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L136", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_addfielddef", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_addfielddef", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L181", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_updatefielddef", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_updatefielddef", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L230", + "weight": 1.0, + "_src": "src_lib_server_services_asset_types_ts", + "_tgt": "asset_types_removefielddef", + "source": "src_lib_server_services_asset_types_ts", + "target": "asset_types_removefielddef", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L67", + "weight": 1.0, + "_src": "asset_types_createcompanyassettype", + "_tgt": "asset_types_slugifytypeslug", + "source": "asset_types_slugifytypeslug", + "target": "asset_types_createcompanyassettype", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L144", + "weight": 1.0, + "_src": "asset_types_addfielddef", + "_tgt": "asset_types_normalizefieldkey", + "source": "asset_types_normalizefieldkey", + "target": "asset_types_addfielddef", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L88", + "weight": 1.0, + "_src": "asset_types_updatecompanyassettype", + "_tgt": "asset_types_loadeditabletype", + "source": "asset_types_loadeditabletype", + "target": "asset_types_updatecompanyassettype", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L104", + "weight": 1.0, + "_src": "asset_types_deletecompanyassettype", + "_tgt": "asset_types_loadeditabletype", + "source": "asset_types_loadeditabletype", + "target": "asset_types_deletecompanyassettype", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L141", + "weight": 1.0, + "_src": "asset_types_addfielddef", + "_tgt": "asset_types_loadeditabletype", + "source": "asset_types_loadeditabletype", + "target": "asset_types_addfielddef", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L120", + "weight": 1.0, + "_src": "asset_types_deletecompanyassettype", + "_tgt": "s3_s3storage_delete", + "source": "asset_types_deletecompanyassettype", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\asset-types.ts", + "source_location": "L267", + "weight": 1.0, + "_src": "asset_types_removefielddef", + "_tgt": "s3_s3storage_delete", + "source": "asset_types_removefielddef", + "target": "s3_s3storage_delete" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L58", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_loadtypewithfields", + "source": "src_lib_server_services_assets_ts", + "target": "assets_loadtypewithfields", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L73", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_validatecustomfields", + "source": "src_lib_server_services_assets_ts", + "target": "assets_validatecustomfields", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L84", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_assertcontainer", + "source": "src_lib_server_services_assets_ts", + "target": "assets_assertcontainer", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L114", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_createasset", + "source": "src_lib_server_services_assets_ts", + "target": "assets_createasset", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L165", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_updateasset", + "source": "src_lib_server_services_assets_ts", + "target": "assets_updateasset", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L211", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_moveasset", + "source": "src_lib_server_services_assets_ts", + "target": "assets_moveasset", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L268", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_softdeleteasset", + "source": "src_lib_server_services_assets_ts", + "target": "assets_softdeleteasset", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L275", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_appendassetlog", + "source": "src_lib_server_services_assets_ts", + "target": "assets_appendassetlog", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L303", + "weight": 1.0, + "_src": "src_lib_server_services_assets_ts", + "_tgt": "assets_listassets", + "source": "src_lib_server_services_assets_ts", + "target": "assets_listassets", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L77", + "weight": 1.0, + "_src": "assets_validatecustomfields", + "_tgt": "assets_loadtypewithfields", + "source": "assets_loadtypewithfields", + "target": "assets_validatecustomfields", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "assets_loadtypewithfields", + "source": "assets_loadtypewithfields", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", + "source_location": "L27", + "weight": 1.0, + "_src": "layout_server_load", + "_tgt": "assets_loadtypewithfields", + "source": "assets_loadtypewithfields", + "target": "layout_server_load" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L115", + "weight": 1.0, + "_src": "assets_createasset", + "_tgt": "assets_validatecustomfields", + "source": "assets_validatecustomfields", + "target": "assets_createasset", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L179", + "weight": 1.0, + "_src": "assets_updateasset", + "_tgt": "assets_validatecustomfields", + "source": "assets_validatecustomfields", + "target": "assets_updateasset", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L79", + "weight": 1.0, + "_src": "assets_validatecustomfields", + "_tgt": "custom_fields_getcachedcustomfieldsschema", + "source": "assets_validatecustomfields", + "target": "custom_fields_getcachedcustomfieldsschema" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L116", + "weight": 1.0, + "_src": "assets_createasset", + "_tgt": "assets_assertcontainer", + "source": "assets_assertcontainer", + "target": "assets_createasset", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L223", + "weight": 1.0, + "_src": "assets_moveasset", + "_tgt": "assets_assertcontainer", + "source": "assets_assertcontainer", + "target": "assets_moveasset", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L123", + "weight": 1.0, + "_src": "assets_createasset", + "_tgt": "rooms_assertroominproperty", + "source": "assets_createasset", + "target": "rooms_assertroominproperty" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L191", + "weight": 1.0, + "_src": "assets_updateasset", + "_tgt": "rooms_assertroominproperty", + "source": "assets_updateasset", + "target": "rooms_assertroominproperty" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\assets.ts", + "source_location": "L230", + "weight": 1.0, + "_src": "assets_moveasset", + "_tgt": "rooms_assertroominproperty", + "source": "assets_moveasset", + "target": "rooms_assertroominproperty" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", + "source_location": "L19", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "assets_listassets", + "source": "assets_listassets", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", + "source_location": "L13", + "weight": 1.0, + "_src": "server_get", + "_tgt": "assets_listassets", + "source": "assets_listassets", + "target": "server_get" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_listtemplates", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_listtemplates", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L38", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_gettemplate", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_gettemplate", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L56", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_createtemplate", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_createtemplate", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L74", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_updatetemplate", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_updatetemplate", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L88", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_deletetemplate", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_deletetemplate", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L94", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_addtemplateitem", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_addtemplateitem", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L111", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_removetemplateitem", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_removetemplateitem", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L123", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_instantiatechecklist", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_instantiatechecklist", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L180", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_getinstance", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_getinstance", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L201", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_setitemdone", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_setitemdone", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L222", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_completeinstance", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_completeinstance", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L238", + "weight": 1.0, + "_src": "src_lib_server_services_checklists_ts", + "_tgt": "checklists_listinstancesforscope", + "source": "src_lib_server_services_checklists_ts", + "target": "checklists_listinstancesforscope", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", + "source_location": "L24", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "checklists_listtemplates", + "source": "checklists_listtemplates", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L100", + "weight": 1.0, + "_src": "checklists_addtemplateitem", + "_tgt": "checklists_gettemplate", + "source": "checklists_gettemplate", + "target": "checklists_addtemplateitem", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L116", + "weight": 1.0, + "_src": "checklists_removetemplateitem", + "_tgt": "checklists_gettemplate", + "source": "checklists_gettemplate", + "target": "checklists_removetemplateitem", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", + "source_location": "L13", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "checklists_gettemplate", + "source": "checklists_gettemplate", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L89", + "weight": 1.0, + "_src": "checklists_deletetemplate", + "_tgt": "s3_s3storage_delete", + "source": "checklists_deletetemplate", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L118", + "weight": 1.0, + "_src": "checklists_removetemplateitem", + "_tgt": "s3_s3storage_delete", + "source": "checklists_removetemplateitem", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\checklists.ts", + "source_location": "L209", + "weight": 1.0, + "_src": "checklists_setitemdone", + "_tgt": "checklists_getinstance", + "source": "checklists_getinstance", + "target": "checklists_setitemdone", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", + "source_location": "L34", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "checklists_getinstance", + "source": "checklists_getinstance", + "target": "page_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_lib_server_services_companies_ts", + "_tgt": "companies_slugify", + "source": "src_lib_server_services_companies_ts", + "target": "companies_slugify", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L15", + "weight": 1.0, + "_src": "src_lib_server_services_companies_ts", + "_tgt": "companies_getcompany", + "source": "src_lib_server_services_companies_ts", + "target": "companies_getcompany", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L24", + "weight": 1.0, + "_src": "src_lib_server_services_companies_ts", + "_tgt": "companies_updatecompany", + "source": "src_lib_server_services_companies_ts", + "target": "companies_updatecompany", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L39", + "weight": 1.0, + "_src": "src_lib_server_services_companies_ts", + "_tgt": "companies_createcompanywithadmin", + "source": "src_lib_server_services_companies_ts", + "target": "companies_createcompanywithadmin", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L31", + "weight": 1.0, + "_src": "companies_updatecompany", + "_tgt": "companies_slugify", + "source": "companies_slugify", + "target": "companies_updatecompany", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\companies.ts", + "source_location": "L47", + "weight": 1.0, + "_src": "companies_createcompanywithadmin", + "_tgt": "companies_slugify", + "source": "companies_slugify", + "target": "companies_createcompanywithadmin", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", + "source_location": "L30", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "companies_getcompany", + "source": "companies_getcompany", + "target": "page_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L24", + "weight": 1.0, + "_src": "src_lib_server_services_decisions_ts", + "_tgt": "decisions_createdecision", + "source": "src_lib_server_services_decisions_ts", + "target": "decisions_createdecision", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L74", + "weight": 1.0, + "_src": "src_lib_server_services_decisions_ts", + "_tgt": "decisions_decisionscopelink", + "source": "src_lib_server_services_decisions_ts", + "target": "decisions_decisionscopelink", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L88", + "weight": 1.0, + "_src": "src_lib_server_services_decisions_ts", + "_tgt": "decisions_listdecisionsforscope", + "source": "src_lib_server_services_decisions_ts", + "target": "decisions_listdecisionsforscope", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L120", + "weight": 1.0, + "_src": "src_lib_server_services_decisions_ts", + "_tgt": "decisions_softdeletedecision", + "source": "src_lib_server_services_decisions_ts", + "target": "decisions_softdeletedecision", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L60", + "weight": 1.0, + "_src": "decisions_createdecision", + "_tgt": "decisions_decisionscopelink", + "source": "decisions_createdecision", + "target": "decisions_decisionscopelink", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\decisions.ts", + "source_location": "L61", + "weight": 1.0, + "_src": "decisions_createdecision", + "_tgt": "notifications_notify", + "source": "decisions_createdecision", + "target": "notifications_notify" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "decisions_listdecisionsforscope", + "source": "decisions_listdecisionsforscope", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "server_get", + "_tgt": "decisions_listdecisionsforscope", + "source": "decisions_listdecisionsforscope", + "target": "server_get" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L20", + "weight": 1.0, + "_src": "src_lib_server_services_documents_ts", + "_tgt": "documents_assertscope", + "source": "src_lib_server_services_documents_ts", + "target": "documents_assertscope", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L47", + "weight": 1.0, + "_src": "src_lib_server_services_documents_ts", + "_tgt": "documents_uploaddocument", + "source": "src_lib_server_services_documents_ts", + "target": "documents_uploaddocument", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L75", + "weight": 1.0, + "_src": "src_lib_server_services_documents_ts", + "_tgt": "documents_listdocumentsforscope", + "source": "src_lib_server_services_documents_ts", + "target": "documents_listdocumentsforscope", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L93", + "weight": 1.0, + "_src": "src_lib_server_services_documents_ts", + "_tgt": "documents_getdocument", + "source": "src_lib_server_services_documents_ts", + "target": "documents_getdocument", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L102", + "weight": 1.0, + "_src": "src_lib_server_services_documents_ts", + "_tgt": "documents_deletedocument", + "source": "src_lib_server_services_documents_ts", + "target": "documents_deletedocument", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L113", + "weight": 1.0, + "_src": "src_lib_server_services_documents_ts", + "_tgt": "documents_signedurlfordocument", + "source": "src_lib_server_services_documents_ts", + "target": "documents_signedurlfordocument", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L48", + "weight": 1.0, + "_src": "documents_uploaddocument", + "_tgt": "documents_assertscope", + "source": "documents_assertscope", + "target": "documents_uploaddocument", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L50", + "weight": 1.0, + "_src": "documents_uploaddocument", + "_tgt": "index_getstorage", + "source": "documents_uploaddocument", + "target": "index_getstorage" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L51", + "weight": 1.0, + "_src": "documents_uploaddocument", + "_tgt": "s3_s3storage_generatekey", + "source": "documents_uploaddocument", + "target": "s3_s3storage_generatekey" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L52", + "weight": 1.0, + "_src": "documents_uploaddocument", + "_tgt": "s3_s3storage_put", + "source": "documents_uploaddocument", + "target": "s3_s3storage_put" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\api\\documents\\+server.ts", + "source_location": "L40", + "weight": 1.0, + "_src": "server_post", + "_tgt": "documents_uploaddocument", + "source": "documents_uploaddocument", + "target": "server_post" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", + "source_location": "L14", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "documents_listdocumentsforscope", + "source": "documents_listdocumentsforscope", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L103", + "weight": 1.0, + "_src": "documents_deletedocument", + "_tgt": "documents_getdocument", + "source": "documents_getdocument", + "target": "documents_deletedocument", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L105", + "weight": 1.0, + "_src": "documents_deletedocument", + "_tgt": "index_getstorage", + "source": "documents_deletedocument", + "target": "index_getstorage" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L106", + "weight": 1.0, + "_src": "documents_deletedocument", + "_tgt": "s3_s3storage_delete", + "source": "documents_deletedocument", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L117", + "weight": 1.0, + "_src": "documents_signedurlfordocument", + "_tgt": "index_getstorage", + "source": "documents_signedurlfordocument", + "target": "index_getstorage" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\documents.ts", + "source_location": "L118", + "weight": 1.0, + "_src": "documents_signedurlfordocument", + "_tgt": "s3_s3storage_getsignedurl", + "source": "documents_signedurlfordocument", + "target": "s3_s3storage_getsignedurl" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L19", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_addinterval", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_addinterval", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L34", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_assertasset", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_assertasset", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L59", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_createschedule", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_createschedule", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L99", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_listschedulesforasset", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_listschedulesforasset", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L108", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_getschedule", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_getschedule", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L121", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_setscheduleactive", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_setscheduleactive", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L134", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_deleteschedule", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_deleteschedule", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L142", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_recordusagereading", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_recordusagereading", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L167", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_latestusagereading", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_latestusagereading", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L201", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_recordmaintenanceevent", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_recordmaintenanceevent", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L285", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_listeventsforasset", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_listeventsforasset", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L305", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_listusagereadingsforasset", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_listusagereadingsforasset", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L323", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_listdueandoverdue", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_listdueandoverdue", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L352", + "weight": 1.0, + "_src": "src_lib_server_services_maintenance_ts", + "_tgt": "maintenance_countoverdueforcompany", + "source": "src_lib_server_services_maintenance_ts", + "target": "maintenance_countoverdueforcompany", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L86", + "weight": 1.0, + "_src": "maintenance_createschedule", + "_tgt": "maintenance_addinterval", + "source": "maintenance_addinterval", + "target": "maintenance_createschedule", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L60", + "weight": 1.0, + "_src": "maintenance_createschedule", + "_tgt": "maintenance_assertasset", + "source": "maintenance_assertasset", + "target": "maintenance_createschedule", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L100", + "weight": 1.0, + "_src": "maintenance_listschedulesforasset", + "_tgt": "maintenance_assertasset", + "source": "maintenance_assertasset", + "target": "maintenance_listschedulesforasset", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L150", + "weight": 1.0, + "_src": "maintenance_recordusagereading", + "_tgt": "maintenance_assertasset", + "source": "maintenance_assertasset", + "target": "maintenance_recordusagereading", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L286", + "weight": 1.0, + "_src": "maintenance_listeventsforasset", + "_tgt": "maintenance_assertasset", + "source": "maintenance_assertasset", + "target": "maintenance_listeventsforasset", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L306", + "weight": 1.0, + "_src": "maintenance_listusagereadingsforasset", + "_tgt": "maintenance_assertasset", + "source": "maintenance_assertasset", + "target": "maintenance_listusagereadingsforasset", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", + "source_location": "L21", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "maintenance_listschedulesforasset", + "source": "maintenance_listschedulesforasset", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L126", + "weight": 1.0, + "_src": "maintenance_setscheduleactive", + "_tgt": "maintenance_getschedule", + "source": "maintenance_getschedule", + "target": "maintenance_setscheduleactive", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L135", + "weight": 1.0, + "_src": "maintenance_deleteschedule", + "_tgt": "maintenance_getschedule", + "source": "maintenance_getschedule", + "target": "maintenance_deleteschedule", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L205", + "weight": 1.0, + "_src": "maintenance_recordmaintenanceevent", + "_tgt": "maintenance_getschedule", + "source": "maintenance_getschedule", + "target": "maintenance_recordmaintenanceevent", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\maintenance.ts", + "source_location": "L137", + "weight": 1.0, + "_src": "maintenance_deleteschedule", + "_tgt": "s3_s3storage_delete", + "source": "maintenance_deleteschedule", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", + "source_location": "L22", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "maintenance_listeventsforasset", + "source": "maintenance_listeventsforasset", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", + "source_location": "L23", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "maintenance_listusagereadingsforasset", + "source": "maintenance_listusagereadingsforasset", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\+page.server.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "maintenance_listdueandoverdue", + "source": "maintenance_listdueandoverdue", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "server_get", + "_tgt": "maintenance_listdueandoverdue", + "source": "maintenance_listdueandoverdue", + "target": "server_get" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\+page.server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "maintenance_countoverdueforcompany", + "source": "maintenance_countoverdueforcompany", + "target": "page_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L31", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_parsesettings", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_parsesettings", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L40", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_absolutelink", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_absolutelink", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L51", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_notify", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_notify", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L70", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_fanoutexternal", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_fanoutexternal", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L125", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_renderemailhtml", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_renderemailhtml", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L144", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_unreadcountforuser", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_unreadcountforuser", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L161", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_listforuser", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_listforuser", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L176", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_markread", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_markread", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L190", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_markallread", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_markallread", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L211", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_updateuserprefs", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_updateuserprefs", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L229", + "weight": 1.0, + "_src": "src_lib_server_services_notifications_ts", + "_tgt": "notifications_getuserprefs", + "source": "src_lib_server_services_notifications_ts", + "target": "notifications_getuserprefs", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L111", + "weight": 1.0, + "_src": "notifications_fanoutexternal", + "_tgt": "notifications_parsesettings", + "source": "notifications_parsesettings", + "target": "notifications_fanoutexternal", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L85", + "weight": 1.0, + "_src": "notifications_fanoutexternal", + "_tgt": "notifications_absolutelink", + "source": "notifications_absolutelink", + "target": "notifications_fanoutexternal", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\notifications.ts", + "source_location": "L65", + "weight": 1.0, + "_src": "notifications_notify", + "_tgt": "notifications_fanoutexternal", + "source": "notifications_notify", + "target": "notifications_fanoutexternal", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L114", + "weight": 1.0, + "_src": "tasks_updatetask", + "_tgt": "notifications_notify", + "source": "notifications_notify", + "target": "tasks_updatetask" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\+layout.server.ts", + "source_location": "L44", + "weight": 1.0, + "_src": "layout_server_load", + "_tgt": "notifications_unreadcountforuser", + "source": "notifications_unreadcountforuser", + "target": "layout_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "notifications_listforuser", + "source": "notifications_listforuser", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", + "source_location": "L11", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "notifications_getuserprefs", + "source": "notifications_getuserprefs", + "target": "page_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "src_lib_server_services_projects_ts", + "_tgt": "projects_createproject", + "source": "src_lib_server_services_projects_ts", + "target": "projects_createproject", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L31", + "weight": 1.0, + "_src": "src_lib_server_services_projects_ts", + "_tgt": "projects_listprojects", + "source": "src_lib_server_services_projects_ts", + "target": "projects_listprojects", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L39", + "weight": 1.0, + "_src": "src_lib_server_services_projects_ts", + "_tgt": "projects_getproject", + "source": "src_lib_server_services_projects_ts", + "target": "projects_getproject", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L50", + "weight": 1.0, + "_src": "src_lib_server_services_projects_ts", + "_tgt": "projects_updateproject", + "source": "src_lib_server_services_projects_ts", + "target": "projects_updateproject", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\projects.ts", + "source_location": "L68", + "weight": 1.0, + "_src": "src_lib_server_services_projects_ts", + "_tgt": "projects_softdeleteproject", + "source": "src_lib_server_services_projects_ts", + "target": "projects_softdeleteproject", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", + "source_location": "L7", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "projects_listprojects", + "source": "projects_listprojects", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", + "source_location": "L7", + "weight": 1.0, + "_src": "layout_server_load", + "_tgt": "projects_getproject", + "source": "projects_getproject", + "target": "layout_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L19", + "weight": 1.0, + "_src": "src_lib_server_services_properties_ts", + "_tgt": "properties_createproperty", + "source": "src_lib_server_services_properties_ts", + "target": "properties_createproperty", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L37", + "weight": 1.0, + "_src": "src_lib_server_services_properties_ts", + "_tgt": "properties_listproperties", + "source": "src_lib_server_services_properties_ts", + "target": "properties_listproperties", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L45", + "weight": 1.0, + "_src": "src_lib_server_services_properties_ts", + "_tgt": "properties_getproperty", + "source": "src_lib_server_services_properties_ts", + "target": "properties_getproperty", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L60", + "weight": 1.0, + "_src": "src_lib_server_services_properties_ts", + "_tgt": "properties_updateproperty", + "source": "src_lib_server_services_properties_ts", + "target": "properties_updateproperty", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\properties.ts", + "source_location": "L83", + "weight": 1.0, + "_src": "src_lib_server_services_properties_ts", + "_tgt": "properties_softdeleteproperty", + "source": "src_lib_server_services_properties_ts", + "target": "properties_softdeleteproperty", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", + "source_location": "L7", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "properties_listproperties", + "source": "properties_listproperties", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", + "source_location": "L7", + "weight": 1.0, + "_src": "layout_server_load", + "_tgt": "properties_getproperty", + "source": "properties_getproperty", + "target": "layout_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_assertproperty", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_assertproperty", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L29", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_listfloors", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_listfloors", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L38", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_createfloor", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_createfloor", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L63", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_updatefloor", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_updatefloor", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L85", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_deletefloor", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_deletefloor", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L99", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_listroomswithcounts", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_listroomswithcounts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L129", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_getroom", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_getroom", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L145", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_createroom", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_createroom", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L188", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_updateroom", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_updateroom", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L217", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_softdeleteroom", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_softdeleteroom", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L239", + "weight": 1.0, + "_src": "src_lib_server_services_rooms_ts", + "_tgt": "rooms_assertroominproperty", + "source": "src_lib_server_services_rooms_ts", + "target": "rooms_assertroominproperty", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L30", + "weight": 1.0, + "_src": "rooms_listfloors", + "_tgt": "rooms_assertproperty", + "source": "rooms_assertproperty", + "target": "rooms_listfloors", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L44", + "weight": 1.0, + "_src": "rooms_createfloor", + "_tgt": "rooms_assertproperty", + "source": "rooms_assertproperty", + "target": "rooms_createfloor", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L100", + "weight": 1.0, + "_src": "rooms_listroomswithcounts", + "_tgt": "rooms_assertproperty", + "source": "rooms_assertproperty", + "target": "rooms_listroomswithcounts", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L152", + "weight": 1.0, + "_src": "rooms_createroom", + "_tgt": "rooms_assertproperty", + "source": "rooms_assertproperty", + "target": "rooms_createroom", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", + "source_location": "L18", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "rooms_listfloors", + "source": "rooms_listfloors", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L94", + "weight": 1.0, + "_src": "rooms_deletefloor", + "_tgt": "s3_s3storage_delete", + "source": "rooms_deletefloor", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", + "source_location": "L19", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "rooms_listroomswithcounts", + "source": "rooms_listroomswithcounts", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L193", + "weight": 1.0, + "_src": "rooms_updateroom", + "_tgt": "rooms_getroom", + "source": "rooms_getroom", + "target": "rooms_updateroom", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\rooms.ts", + "source_location": "L218", + "weight": 1.0, + "_src": "rooms_softdeleteroom", + "_tgt": "rooms_getroom", + "source": "rooms_getroom", + "target": "rooms_softdeleteroom", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_assertworkpackage", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_assertworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L24", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_listtasksforworkpackage", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_listtasksforworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L33", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_createtask", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_createtask", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L62", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_gettaskwithsubtasks", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_gettaskwithsubtasks", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L79", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_updatetask", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_updatetask", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L125", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_softdeletetask", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_softdeletetask", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L136", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_addsubtask", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_addsubtask", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L143", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_togglesubtask", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_togglesubtask", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L157", + "weight": 1.0, + "_src": "src_lib_server_services_tasks_ts", + "_tgt": "tasks_removesubtask", + "source": "src_lib_server_services_tasks_ts", + "target": "tasks_removesubtask", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L25", + "weight": 1.0, + "_src": "tasks_listtasksforworkpackage", + "_tgt": "tasks_assertworkpackage", + "source": "tasks_assertworkpackage", + "target": "tasks_listtasksforworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L42", + "weight": 1.0, + "_src": "tasks_createtask", + "_tgt": "tasks_assertworkpackage", + "source": "tasks_assertworkpackage", + "target": "tasks_createtask", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "tasks_listtasksforworkpackage", + "source": "tasks_listtasksforworkpackage", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L90", + "weight": 1.0, + "_src": "tasks_updatetask", + "_tgt": "tasks_gettaskwithsubtasks", + "source": "tasks_gettaskwithsubtasks", + "target": "tasks_updatetask", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L126", + "weight": 1.0, + "_src": "tasks_softdeletetask", + "_tgt": "tasks_gettaskwithsubtasks", + "source": "tasks_gettaskwithsubtasks", + "target": "tasks_softdeletetask", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L137", + "weight": 1.0, + "_src": "tasks_addsubtask", + "_tgt": "tasks_gettaskwithsubtasks", + "source": "tasks_gettaskwithsubtasks", + "target": "tasks_addsubtask", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L149", + "weight": 1.0, + "_src": "tasks_togglesubtask", + "_tgt": "tasks_gettaskwithsubtasks", + "source": "tasks_gettaskwithsubtasks", + "target": "tasks_togglesubtask", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L162", + "weight": 1.0, + "_src": "tasks_removesubtask", + "_tgt": "tasks_gettaskwithsubtasks", + "source": "tasks_gettaskwithsubtasks", + "target": "tasks_removesubtask", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "tasks_gettaskwithsubtasks", + "source": "tasks_gettaskwithsubtasks", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\tasks.ts", + "source_location": "L164", + "weight": 1.0, + "_src": "tasks_removesubtask", + "_tgt": "s3_s3storage_delete", + "source": "tasks_removesubtask", + "target": "s3_s3storage_delete" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L20", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_listcompanyusers", + "source": "src_lib_server_services_users_ts", + "target": "users_listcompanyusers", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L39", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_countadmins", + "source": "src_lib_server_services_users_ts", + "target": "users_countadmins", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L67", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_createuserandaddtocompany", + "source": "src_lib_server_services_users_ts", + "target": "users_createuserandaddtocompany", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L119", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_updatedisplayname", + "source": "src_lib_server_services_users_ts", + "target": "users_updatedisplayname", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L130", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_setuserroleincompany", + "source": "src_lib_server_services_users_ts", + "target": "users_setuserroleincompany", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L154", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_removeuserfromcompany", + "source": "src_lib_server_services_users_ts", + "target": "users_removeuserfromcompany", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L176", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_setuseractive", + "source": "src_lib_server_services_users_ts", + "target": "users_setuseractive", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L199", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_resetuserpassword", + "source": "src_lib_server_services_users_ts", + "target": "users_resetuserpassword", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L212", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_assertmembership", + "source": "src_lib_server_services_users_ts", + "target": "users_assertmembership", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L223", + "weight": 1.0, + "_src": "src_lib_server_services_users_ts", + "_tgt": "users_isself", + "source": "src_lib_server_services_users_ts", + "target": "users_isself", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", + "source_location": "L18", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "users_listcompanyusers", + "source": "users_listcompanyusers", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L143", + "weight": 1.0, + "_src": "users_setuserroleincompany", + "_tgt": "users_countadmins", + "source": "users_countadmins", + "target": "users_setuserroleincompany", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L166", + "weight": 1.0, + "_src": "users_removeuserfromcompany", + "_tgt": "users_countadmins", + "source": "users_countadmins", + "target": "users_removeuserfromcompany", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L190", + "weight": 1.0, + "_src": "users_setuseractive", + "_tgt": "users_countadmins", + "source": "users_countadmins", + "target": "users_setuseractive", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L70", + "weight": 1.0, + "_src": "users_createuserandaddtocompany", + "_tgt": "email_normalizeemail", + "source": "users_createuserandaddtocompany", + "target": "email_normalizeemail" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L124", + "weight": 1.0, + "_src": "users_updatedisplayname", + "_tgt": "users_assertmembership", + "source": "users_updatedisplayname", + "target": "users_assertmembership", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L135", + "weight": 1.0, + "_src": "users_setuserroleincompany", + "_tgt": "users_assertmembership", + "source": "users_setuserroleincompany", + "target": "users_assertmembership", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L158", + "weight": 1.0, + "_src": "users_removeuserfromcompany", + "_tgt": "users_assertmembership", + "source": "users_removeuserfromcompany", + "target": "users_assertmembership", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L171", + "weight": 1.0, + "_src": "users_removeuserfromcompany", + "_tgt": "s3_s3storage_delete", + "source": "users_removeuserfromcompany", + "target": "s3_s3storage_delete" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L181", + "weight": 1.0, + "_src": "users_setuseractive", + "_tgt": "users_assertmembership", + "source": "users_setuseractive", + "target": "users_assertmembership", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\users.ts", + "source_location": "L204", + "weight": 1.0, + "_src": "users_resetuserpassword", + "_tgt": "users_assertmembership", + "source": "users_resetuserpassword", + "target": "users_assertmembership", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_slugify", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_slugify", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L19", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_scopeidmatches", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_scopeidmatches", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L23", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_listpagesforscope", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_listpagesforscope", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L47", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_getpagewithcurrentrevision", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_getpagewithcurrentrevision", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L80", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_listrevisions", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_listrevisions", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L102", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_getrevision", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_getrevision", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L125", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_upsertpage", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_upsertpage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L214", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_softdeletepage", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_softdeletepage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L225", + "weight": 1.0, + "_src": "src_lib_server_services_wiki_ts", + "_tgt": "wiki_searchpages", + "source": "src_lib_server_services_wiki_ts", + "target": "wiki_searchpages", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L135", + "weight": 1.0, + "_src": "wiki_upsertpage", + "_tgt": "wiki_slugify", + "source": "wiki_slugify", + "target": "wiki_upsertpage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L40", + "weight": 1.0, + "_src": "wiki_listpagesforscope", + "_tgt": "wiki_scopeidmatches", + "source": "wiki_scopeidmatches", + "target": "wiki_listpagesforscope", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L60", + "weight": 1.0, + "_src": "wiki_getpagewithcurrentrevision", + "_tgt": "wiki_scopeidmatches", + "source": "wiki_scopeidmatches", + "target": "wiki_getpagewithcurrentrevision", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\wiki.ts", + "source_location": "L249", + "weight": 1.0, + "_src": "wiki_searchpages", + "_tgt": "wiki_scopeidmatches", + "source": "wiki_scopeidmatches", + "target": "wiki_searchpages", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "wiki_listpagesforscope", + "source": "wiki_listpagesforscope", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "wiki_getpagewithcurrentrevision", + "source": "wiki_getpagewithcurrentrevision", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "wiki_listrevisions", + "source": "wiki_listrevisions", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "wiki_getrevision", + "source": "wiki_getrevision", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "wiki_searchpages", + "source": "wiki_searchpages", + "target": "page_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_lib_server_services_work_packages_ts", + "_tgt": "work_packages_assertproject", + "source": "src_lib_server_services_work_packages_ts", + "target": "work_packages_assertproject", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L20", + "weight": 1.0, + "_src": "src_lib_server_services_work_packages_ts", + "_tgt": "work_packages_listworkpackagesforproject", + "source": "src_lib_server_services_work_packages_ts", + "target": "work_packages_listworkpackagesforproject", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L47", + "weight": 1.0, + "_src": "src_lib_server_services_work_packages_ts", + "_tgt": "work_packages_createworkpackage", + "source": "src_lib_server_services_work_packages_ts", + "target": "work_packages_createworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L72", + "weight": 1.0, + "_src": "src_lib_server_services_work_packages_ts", + "_tgt": "work_packages_getworkpackage", + "source": "src_lib_server_services_work_packages_ts", + "target": "work_packages_getworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L88", + "weight": 1.0, + "_src": "src_lib_server_services_work_packages_ts", + "_tgt": "work_packages_updateworkpackage", + "source": "src_lib_server_services_work_packages_ts", + "target": "work_packages_updateworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L104", + "weight": 1.0, + "_src": "src_lib_server_services_work_packages_ts", + "_tgt": "work_packages_softdeleteworkpackage", + "source": "src_lib_server_services_work_packages_ts", + "target": "work_packages_softdeleteworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L21", + "weight": 1.0, + "_src": "work_packages_listworkpackagesforproject", + "_tgt": "work_packages_assertproject", + "source": "work_packages_assertproject", + "target": "work_packages_listworkpackagesforproject", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L53", + "weight": 1.0, + "_src": "work_packages_createworkpackage", + "_tgt": "work_packages_assertproject", + "source": "work_packages_assertproject", + "target": "work_packages_createworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", + "source_location": "L11", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "work_packages_listworkpackagesforproject", + "source": "work_packages_listworkpackagesforproject", + "target": "page_server_load" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L93", + "weight": 1.0, + "_src": "work_packages_updateworkpackage", + "_tgt": "work_packages_getworkpackage", + "source": "work_packages_getworkpackage", + "target": "work_packages_updateworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\services\\work-packages.ts", + "source_location": "L105", + "weight": 1.0, + "_src": "work_packages_softdeleteworkpackage", + "_tgt": "work_packages_getworkpackage", + "source": "work_packages_getworkpackage", + "target": "work_packages_softdeleteworkpackage", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "work_packages_getworkpackage", + "source": "work_packages_getworkpackage", + "target": "page_server_load" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\index.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "src_lib_server_storage_index_ts", + "_tgt": "index_getstorage", + "source": "src_lib_server_storage_index_ts", + "target": "index_getstorage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\index.ts", + "source_location": "L35", + "weight": 1.0, + "_src": "src_lib_server_storage_index_ts", + "_tgt": "index_setstoragefortesting", + "source": "src_lib_server_storage_index_ts", + "target": "index_setstoragefortesting", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\api\\files\\+server.ts", + "source_location": "L7", + "weight": 1.0, + "_src": "server_get", + "_tgt": "index_getstorage", + "source": "index_getstorage", + "target": "server_get" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L15", + "weight": 1.0, + "_src": "src_lib_server_storage_local_ts", + "_tgt": "local_localdiskstorage", + "source": "src_lib_server_storage_local_ts", + "target": "local_localdiskstorage", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_constructor", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_constructor", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L22", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_resolve", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_resolve", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L29", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_put", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_put", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L67", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_get", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_get", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L77", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_head", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_head", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L82", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_delete", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_delete", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L88", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_generatekey", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_generatekey", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L92", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_getsignedurl", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_getsignedurl", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L108", + "weight": 1.0, + "_src": "local_localdiskstorage", + "_tgt": "local_localdiskstorage_verifysignedurl", + "source": "local_localdiskstorage", + "target": "local_localdiskstorage_verifysignedurl", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L30", + "weight": 1.0, + "_src": "local_localdiskstorage_put", + "_tgt": "local_localdiskstorage_resolve", + "source": "local_localdiskstorage_resolve", + "target": "local_localdiskstorage_put", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L68", + "weight": 1.0, + "_src": "local_localdiskstorage_get", + "_tgt": "local_localdiskstorage_resolve", + "source": "local_localdiskstorage_resolve", + "target": "local_localdiskstorage_get", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L78", + "weight": 1.0, + "_src": "local_localdiskstorage_head", + "_tgt": "local_localdiskstorage_resolve", + "source": "local_localdiskstorage_resolve", + "target": "local_localdiskstorage_head", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L83", + "weight": 1.0, + "_src": "local_localdiskstorage_delete", + "_tgt": "local_localdiskstorage_resolve", + "source": "local_localdiskstorage_resolve", + "target": "local_localdiskstorage_delete", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L109", + "weight": 1.0, + "_src": "local_localdiskstorage_verifysignedurl", + "_tgt": "local_localdiskstorage_get", + "source": "local_localdiskstorage_get", + "target": "local_localdiskstorage_verifysignedurl", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\storage\\local.ts", + "source_location": "L89", + "weight": 1.0, + "_src": "local_localdiskstorage_generatekey", + "_tgt": "types_generatestoragekey", + "source": "local_localdiskstorage_generatekey", + "target": "types_generatestoragekey" + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\api\\files\\+server.ts", + "source_location": "L14", + "weight": 1.0, + "_src": "server_get", + "_tgt": "local_localdiskstorage_verifysignedurl", + "source": "local_localdiskstorage_verifysignedurl", + "target": "server_get" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L30", + "weight": 1.0, + "_src": "src_lib_server_storage_s3_ts", + "_tgt": "s3_s3storage", + "source": "src_lib_server_storage_s3_ts", + "target": "s3_s3storage", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L115", + "weight": 1.0, + "_src": "src_lib_server_storage_s3_ts", + "_tgt": "s3_streamtobuffer", + "source": "src_lib_server_storage_s3_ts", + "target": "s3_streamtobuffer", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L34", + "weight": 1.0, + "_src": "s3_s3storage", + "_tgt": "s3_s3storage_constructor", + "source": "s3_s3storage", + "target": "s3_s3storage_constructor", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L50", + "weight": 1.0, + "_src": "s3_s3storage", + "_tgt": "s3_s3storage_generatekey", + "source": "s3_s3storage", + "target": "s3_s3storage_generatekey", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L54", + "weight": 1.0, + "_src": "s3_s3storage", + "_tgt": "s3_s3storage_put", + "source": "s3_s3storage", + "target": "s3_s3storage_put", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L77", + "weight": 1.0, + "_src": "s3_s3storage", + "_tgt": "s3_s3storage_get", + "source": "s3_s3storage", + "target": "s3_s3storage_get", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L89", + "weight": 1.0, + "_src": "s3_s3storage", + "_tgt": "s3_s3storage_head", + "source": "s3_s3storage", + "target": "s3_s3storage_head", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L99", + "weight": 1.0, + "_src": "s3_s3storage", + "_tgt": "s3_s3storage_delete", + "source": "s3_s3storage", + "target": "s3_s3storage_delete", + "confidence_score": 1.0 + }, + { + "relation": "method", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L103", + "weight": 1.0, + "_src": "s3_s3storage", + "_tgt": "s3_s3storage_getsignedurl", + "source": "s3_s3storage", + "target": "s3_s3storage_getsignedurl", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L51", + "weight": 1.0, + "_src": "s3_s3storage_generatekey", + "_tgt": "types_generatestoragekey", + "source": "s3_s3storage_generatekey", + "target": "types_generatestoragekey" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\s3.ts", + "source_location": "L57", + "weight": 1.0, + "_src": "s3_s3storage_put", + "_tgt": "s3_streamtobuffer", + "source": "s3_s3storage_put", + "target": "s3_streamtobuffer", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\logout\\+server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "server_handlelogout", + "_tgt": "s3_s3storage_delete", + "source": "s3_s3storage_delete", + "target": "server_handlelogout" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\storage\\types.ts", + "source_location": "L40", + "weight": 1.0, + "_src": "src_lib_server_storage_types_ts", + "_tgt": "types_generatestoragekey", + "source": "src_lib_server_storage_types_ts", + "target": "types_generatestoragekey", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L24", + "weight": 1.0, + "_src": "src_lib_server_validation_custom_fields_ts", + "_tgt": "custom_fields_validatorfor", + "source": "src_lib_server_validation_custom_fields_ts", + "target": "custom_fields_validatorfor", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L70", + "weight": 1.0, + "_src": "src_lib_server_validation_custom_fields_ts", + "_tgt": "custom_fields_buildcustomfieldsschema", + "source": "src_lib_server_validation_custom_fields_ts", + "target": "custom_fields_buildcustomfieldsschema", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L99", + "weight": 1.0, + "_src": "src_lib_server_validation_custom_fields_ts", + "_tgt": "custom_fields_getcachedcustomfieldsschema", + "source": "src_lib_server_validation_custom_fields_ts", + "target": "custom_fields_getcachedcustomfieldsschema", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L111", + "weight": 1.0, + "_src": "src_lib_server_validation_custom_fields_ts", + "_tgt": "custom_fields_clearcustomfieldscache", + "source": "src_lib_server_validation_custom_fields_ts", + "target": "custom_fields_clearcustomfieldscache", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L73", + "weight": 1.0, + "_src": "custom_fields_buildcustomfieldsschema", + "_tgt": "custom_fields_validatorfor", + "source": "custom_fields_validatorfor", + "target": "custom_fields_buildcustomfieldsschema", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L106", + "weight": 1.0, + "_src": "custom_fields_getcachedcustomfieldsschema", + "_tgt": "custom_fields_buildcustomfieldsschema", + "source": "custom_fields_buildcustomfieldsschema", + "target": "custom_fields_getcachedcustomfieldsschema", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\lib\\server\\validation\\custom-fields.ts", + "source_location": "L104", + "weight": 1.0, + "_src": "custom_fields_getcachedcustomfieldsschema", + "_tgt": "server_get", + "source": "custom_fields_getcachedcustomfieldsschema", + "target": "server_get" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\lib\\utils\\email.ts", + "source_location": "L1", + "weight": 1.0, + "_src": "src_lib_utils_email_ts", + "_tgt": "email_normalizeemail", + "source": "src_lib_utils_email_ts", + "target": "email_normalizeemail", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\+layout.server.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "src_routes_app_layout_server_ts", + "_tgt": "layout_server_load", + "source": "src_routes_app_layout_server_ts", + "target": "layout_server_load", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts", + "source_location": "L11", + "weight": 1.0, + "_src": "src_routes_app_assets_id_layout_server_ts", + "_tgt": "layout_server_load", + "source": "layout_server_load", + "target": "src_routes_app_assets_id_layout_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_projects_id_layout_server_ts", + "_tgt": "layout_server_load", + "source": "layout_server_load", + "target": "src_routes_app_projects_id_layout_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_properties_id_layout_server_ts", + "_tgt": "layout_server_load", + "source": "layout_server_load", + "target": "src_routes_app_properties_id_layout_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\+page.server.ts", + "source_location": "L4", + "weight": 1.0, + "_src": "src_routes_app_page_server_ts", + "_tgt": "page_server_load", + "source": "src_routes_app_page_server_ts", + "target": "page_server_load", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts", + "source_location": "L7", + "weight": 1.0, + "_src": "src_routes_app_admin_asset_types_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_admin_asset_types_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", + "source_location": "L14", + "weight": 1.0, + "_src": "src_routes_app_admin_asset_types_id_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_admin_asset_types_id_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", + "source_location": "L28", + "weight": 1.0, + "_src": "src_routes_app_admin_company_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_admin_company_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", + "source_location": "L34", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "page_server_parsesettings", + "source": "page_server_load", + "target": "page_server_parsesettings", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\admin\\users\\+page.server.ts", + "source_location": "L16", + "weight": 1.0, + "_src": "src_routes_app_admin_users_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_admin_users_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts", + "source_location": "L17", + "weight": 1.0, + "_src": "src_routes_app_admin_users_new_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_admin_users_new_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "src_routes_app_assets_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\new\\+page.server.ts", + "source_location": "L11", + "weight": 1.0, + "_src": "src_routes_app_assets_new_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_new_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "src_routes_app_assets_id_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_id_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "src_routes_app_assets_id_documents_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_id_documents_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "src_routes_app_assets_id_history_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_id_history_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts", + "source_location": "L4", + "weight": 1.0, + "_src": "src_routes_app_assets_id_label_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_id_label_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "src_routes_app_assets_id_logs_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_id_logs_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts", + "source_location": "L18", + "weight": 1.0, + "_src": "src_routes_app_assets_id_maintenance_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_id_maintenance_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_id_maintenance_events_eventid_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "src_routes_app_assets_id_move_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_assets_id_move_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\checklists\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_checklists_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_checklists_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts", + "source_location": "L11", + "weight": 1.0, + "_src": "src_routes_app_checklists_id_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_checklists_id_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\maintenance\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_maintenance_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_maintenance_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\notifications\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_notifications_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_notifications_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_projects_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_projects_id_assets_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_assets_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_projects_id_decisions_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_decisions_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "src_routes_app_projects_id_documents_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_documents_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_projects_id_wiki_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_wiki_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_projects_id_wiki_slug_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_wiki_slug_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_wiki_slug_edit_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_projects_id_wiki_slug_history_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_wiki_slug_history_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_wiki_slug_revisions_rev_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "src_routes_app_projects_id_work_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_work_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "src_routes_app_projects_id_work_wpid_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_work_wpid_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts", + "source_location": "L14", + "weight": 1.0, + "_src": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_projects_id_work_wpid_taskid_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\properties\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_properties_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_properties_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts", + "source_location": "L32", + "weight": 1.0, + "_src": "src_routes_app_properties_id_accounts_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_properties_id_accounts_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_properties_id_assets_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_properties_id_assets_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "src_routes_app_properties_id_documents_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_properties_id_documents_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts", + "source_location": "L15", + "weight": 1.0, + "_src": "src_routes_app_properties_id_rooms_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_properties_id_rooms_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\settings\\notifications\\+page.server.ts", + "source_location": "L9", + "weight": 1.0, + "_src": "src_routes_app_settings_notifications_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_settings_notifications_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\wiki\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_wiki_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_wiki_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_wiki_slug_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_wiki_slug_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_wiki_slug_edit_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_wiki_slug_edit_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_app_wiki_slug_history_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_wiki_slug_history_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_app_wiki_slug_revisions_rev_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(auth)\\login\\+page.server.ts", + "source_location": "L22", + "weight": 1.0, + "_src": "src_routes_auth_login_page_server_ts", + "_tgt": "page_server_load", + "source": "page_server_load", + "target": "src_routes_auth_login_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\(app)\\assets\\+page.server.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "page_server_load", + "_tgt": "server_get", + "source": "page_server_load", + "target": "server_get" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts", + "source_location": "L69", + "weight": 1.0, + "_src": "src_routes_app_admin_asset_types_id_page_server_ts", + "_tgt": "page_server_parseenumvalues", + "source": "src_routes_app_admin_asset_types_id_page_server_ts", + "target": "page_server_parseenumvalues", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\admin\\company\\+page.server.ts", + "source_location": "L19", + "weight": 1.0, + "_src": "src_routes_app_admin_company_page_server_ts", + "_tgt": "page_server_parsesettings", + "source": "src_routes_app_admin_company_page_server_ts", + "target": "page_server_parsesettings", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_assets_export_csv_server_ts", + "_tgt": "server_get", + "source": "src_routes_app_assets_export_csv_server_ts", + "target": "server_get", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\export.csv\\+server.ts", + "source_location": "L54", + "weight": 1.0, + "_src": "src_routes_app_assets_export_csv_server_ts", + "_tgt": "server_today", + "source": "src_routes_app_assets_export_csv_server_ts", + "target": "server_today", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", + "source_location": "L35", + "weight": 1.0, + "_src": "server_get", + "_tgt": "server_today", + "source": "server_get", + "target": "server_today", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_maintenance_export_csv_server_ts", + "_tgt": "server_get", + "source": "server_get", + "target": "src_routes_app_maintenance_export_csv_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_app_projects_id_decisions_export_csv_server_ts", + "_tgt": "server_get", + "source": "server_get", + "target": "src_routes_app_projects_id_decisions_export_csv_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\api\\files\\+server.ts", + "source_location": "L6", + "weight": 1.0, + "_src": "src_routes_api_files_server_ts", + "_tgt": "server_get", + "source": "server_get", + "target": "src_routes_api_files_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\api\\qr\\+server.ts", + "source_location": "L10", + "weight": 1.0, + "_src": "src_routes_api_qr_server_ts", + "_tgt": "server_get", + "source": "server_get", + "target": "src_routes_api_qr_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\api\\qr\\+server.ts", + "source_location": "L17", + "weight": 1.0, + "_src": "server_get", + "_tgt": "server_clamp", + "source": "server_get", + "target": "server_clamp", + "confidence_score": 1.0 + }, + { + "relation": "calls", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "src\\routes\\api\\documents\\+server.ts", + "source_location": "L17", + "weight": 1.0, + "_src": "server_post", + "_tgt": "server_get", + "source": "server_get", + "target": "server_post" + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts", + "source_location": "L30", + "weight": 1.0, + "_src": "src_routes_app_maintenance_export_csv_server_ts", + "_tgt": "server_today", + "source": "server_today", + "target": "src_routes_app_maintenance_export_csv_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts", + "source_location": "L38", + "weight": 1.0, + "_src": "src_routes_app_projects_id_decisions_export_csv_server_ts", + "_tgt": "server_today", + "source": "server_today", + "target": "src_routes_app_projects_id_decisions_export_csv_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\assets\\[id]\\+page.server.ts", + "source_location": "L44", + "weight": 1.0, + "_src": "src_routes_app_assets_id_page_server_ts", + "_tgt": "page_server_e2n", + "source": "src_routes_app_assets_id_page_server_ts", + "target": "page_server_e2n", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\new\\+page.server.ts", + "source_location": "L15", + "weight": 1.0, + "_src": "src_routes_app_projects_new_page_server_ts", + "_tgt": "page_server_e2n", + "source": "page_server_e2n", + "target": "src_routes_app_projects_new_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\projects\\[id]\\+page.server.ts", + "source_location": "L15", + "weight": 1.0, + "_src": "src_routes_app_projects_id_page_server_ts", + "_tgt": "page_server_e2n", + "source": "page_server_e2n", + "target": "src_routes_app_projects_id_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\properties\\[id]\\+page.server.ts", + "source_location": "L19", + "weight": 1.0, + "_src": "src_routes_app_properties_id_page_server_ts", + "_tgt": "page_server_e2n", + "source": "page_server_e2n", + "target": "src_routes_app_properties_id_page_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\(app)\\properties\\new\\+page.server.ts", + "source_location": "L18", + "weight": 1.0, + "_src": "src_routes_app_properties_new_page_server_ts", + "_tgt": "page_server_emptytonull", + "source": "src_routes_app_properties_new_page_server_ts", + "target": "page_server_emptytonull", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\api\\documents\\+server.ts", + "source_location": "L12", + "weight": 1.0, + "_src": "src_routes_api_documents_server_ts", + "_tgt": "server_post", + "source": "src_routes_api_documents_server_ts", + "target": "server_post", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\switch-company\\+server.ts", + "source_location": "L8", + "weight": 1.0, + "_src": "src_routes_switch_company_server_ts", + "_tgt": "server_post", + "source": "server_post", + "target": "src_routes_switch_company_server_ts", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\api\\qr\\+server.ts", + "source_location": "L42", + "weight": 1.0, + "_src": "src_routes_api_qr_server_ts", + "_tgt": "server_clamp", + "source": "src_routes_api_qr_server_ts", + "target": "server_clamp", + "confidence_score": 1.0 + }, + { + "relation": "contains", + "confidence": "EXTRACTED", + "source_file": "src\\routes\\logout\\+server.ts", + "source_location": "L5", + "weight": 1.0, + "_src": "src_routes_logout_server_ts", + "_tgt": "server_handlelogout", + "source": "src_routes_logout_server_ts", + "target": "server_handlelogout", + "confidence_score": 1.0 + }, + { + "relation": "semantically_similar_to", + "confidence": "INFERRED", + "confidence_score": 0.85, + "source_file": "README.md", + "source_location": "L4,L178", + "weight": 1.0, + "_src": "readme_buildfor_life_ops", + "_tgt": "readme_buildfor_life_budget", + "source": "readme_buildfor_life_ops", + "target": "readme_buildfor_life_budget" + }, + { + "relation": "semantically_similar_to", + "confidence": "INFERRED", + "confidence_score": 0.85, + "source_file": "README.md", + "source_location": "L4,L179", + "weight": 1.0, + "_src": "readme_buildfor_life_ops", + "_tgt": "readme_buildfor_life_repair", + "source": "readme_buildfor_life_ops", + "target": "readme_buildfor_life_repair" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L8", + "weight": 1.0, + "_src": "readme_buildfor_life_ops", + "_tgt": "readme_stack_sveltekit5", + "source": "readme_buildfor_life_ops", + "target": "readme_stack_sveltekit5" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L9", + "weight": 1.0, + "_src": "readme_buildfor_life_ops", + "_tgt": "readme_stack_tailwind_v4", + "source": "readme_buildfor_life_ops", + "target": "readme_stack_tailwind_v4" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L10", + "weight": 1.0, + "_src": "readme_buildfor_life_ops", + "_tgt": "readme_stack_postgres_drizzle", + "source": "readme_buildfor_life_ops", + "target": "readme_stack_postgres_drizzle" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L11", + "weight": 1.0, + "_src": "readme_buildfor_life_ops", + "_tgt": "readme_auth_argon2id", + "source": "readme_buildfor_life_ops", + "target": "readme_auth_argon2id" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L12", + "weight": 1.0, + "_src": "readme_buildfor_life_ops", + "_tgt": "readme_easymde", + "source": "readme_buildfor_life_ops", + "target": "readme_easymde" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L12", + "weight": 1.0, + "_src": "readme_buildfor_life_ops", + "_tgt": "readme_sharp", + "source": "readme_buildfor_life_ops", + "target": "readme_sharp" + }, + { + "relation": "implements", + "confidence": "INFERRED", + "confidence_score": 0.9, + "source_file": "src/app.html", + "source_location": "L1-L20", + "weight": 1.0, + "_src": "apphtml_root", + "_tgt": "readme_stack_sveltekit5", + "source": "readme_stack_sveltekit5", + "target": "apphtml_root" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L9,L17", + "weight": 1.0, + "_src": "apphtml_tailwind_body_classes", + "_tgt": "readme_stack_tailwind_v4", + "source": "readme_stack_tailwind_v4", + "target": "apphtml_tailwind_body_classes" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L154,L12", + "weight": 1.0, + "_src": "readme_roadmap_phase4", + "_tgt": "readme_easymde", + "source": "readme_easymde", + "target": "readme_roadmap_phase4" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L13", + "weight": 1.0, + "_src": "readme_storage_adapter", + "_tgt": "readme_local_disk_storage", + "source": "readme_storage_adapter", + "target": "readme_local_disk_storage" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L144", + "weight": 1.0, + "_src": "readme_storage_adapter", + "_tgt": "readme_s3_storage", + "source": "readme_storage_adapter", + "target": "readme_s3_storage" + }, + { + "relation": "rationale_for", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L141-L144", + "weight": 1.0, + "_src": "readme_storage_model", + "_tgt": "readme_storage_adapter", + "source": "readme_storage_adapter", + "target": "readme_storage_model" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L143", + "weight": 1.0, + "_src": "readme_local_disk_storage", + "_tgt": "readme_hmac_signed_urls", + "source": "readme_local_disk_storage", + "target": "readme_hmac_signed_urls" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L120", + "weight": 1.0, + "_src": "readme_api_files_route", + "_tgt": "readme_local_disk_storage", + "source": "readme_local_disk_storage", + "target": "readme_api_files_route" + }, + { + "relation": "semantically_similar_to", + "confidence": "INFERRED", + "confidence_score": 0.9, + "source_file": "README.md", + "source_location": "L13,L144", + "weight": 1.0, + "_src": "readme_local_disk_storage", + "_tgt": "readme_s3_storage", + "source": "readme_local_disk_storage", + "target": "readme_s3_storage" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L155", + "weight": 1.0, + "_src": "readme_roadmap_phase5", + "_tgt": "readme_s3_storage", + "source": "readme_s3_storage", + "target": "readme_roadmap_phase5" + }, + { + "relation": "shares_data_with", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L108,L183", + "weight": 1.0, + "_src": "readme_env_dotenv", + "_tgt": "readme_env_ts", + "source": "readme_env_dotenv", + "target": "readme_env_ts" + }, + { + "relation": "shares_data_with", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "README.md", + "source_location": "L122", + "weight": 1.0, + "_src": "readme_create_user_script", + "_tgt": "readme_db_schema_dir", + "source": "readme_create_user_script", + "target": "readme_db_schema_dir" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "drizzle/README.md", + "source_location": "L9", + "weight": 1.0, + "_src": "readme_db_migrate", + "_tgt": "drizzle_readme_migrations", + "source": "readme_db_migrate", + "target": "drizzle_readme_migrations" + }, + { + "relation": "calls", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "drizzle/README.md", + "source_location": "L8", + "weight": 1.0, + "_src": "readme_db_generate", + "_tgt": "drizzle_readme_migrations", + "source": "readme_db_generate", + "target": "drizzle_readme_migrations" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "drizzle/README.md", + "source_location": "L10", + "weight": 1.0, + "_src": "readme_db_push", + "_tgt": "drizzle_readme_migrations", + "source": "readme_db_push", + "target": "drizzle_readme_migrations" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "drizzle/README.md", + "source_location": "L11", + "weight": 1.0, + "_src": "readme_db_studio", + "_tgt": "drizzle_readme_migrations", + "source": "readme_db_studio", + "target": "drizzle_readme_migrations" + }, + { + "relation": "rationale_for", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L134", + "weight": 1.0, + "_src": "readme_auth_model", + "_tgt": "readme_sha256_cookie_hash", + "source": "readme_auth_model", + "target": "readme_sha256_cookie_hash" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L135", + "weight": 1.0, + "_src": "readme_auth_model", + "_tgt": "readme_sliding_renewal", + "source": "readme_auth_model", + "target": "readme_sliding_renewal" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L138", + "weight": 1.0, + "_src": "readme_auth_model", + "_tgt": "readme_company_users", + "source": "readme_auth_model", + "target": "readme_company_users" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L99,L135", + "weight": 1.0, + "_src": "readme_hooks_server", + "_tgt": "readme_auth_model", + "source": "readme_auth_model", + "target": "readme_hooks_server" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L137", + "weight": 1.0, + "_src": "readme_layout_app_group", + "_tgt": "readme_auth_model", + "source": "readme_auth_model", + "target": "readme_layout_app_group" + }, + { + "relation": "implements", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L120,L143", + "weight": 1.0, + "_src": "readme_api_files_route", + "_tgt": "readme_hmac_signed_urls", + "source": "readme_hmac_signed_urls", + "target": "readme_api_files_route" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L151,L165", + "weight": 1.0, + "_src": "readme_roadmap_phase1", + "_tgt": "readme_decision_jsonb_custom_fields", + "source": "readme_roadmap_phase1", + "target": "readme_decision_jsonb_custom_fields" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L153,L169", + "weight": 1.0, + "_src": "readme_roadmap_phase3", + "_tgt": "readme_decision_decision_scope", + "source": "readme_roadmap_phase3", + "target": "readme_decision_decision_scope" + }, + { + "relation": "conceptually_related_to", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L165,L168", + "weight": 1.0, + "_src": "readme_decision_jsonb_custom_fields", + "_tgt": "readme_decision_immutable_keys", + "source": "readme_decision_jsonb_custom_fields", + "target": "readme_decision_immutable_keys" + }, + { + "relation": "conceptually_related_to", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L166-L167", + "weight": 1.0, + "_src": "readme_decision_xor_location", + "_tgt": "readme_decision_asset_history", + "source": "readme_decision_xor_location", + "target": "readme_decision_asset_history" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "drizzle/README.md", + "source_location": "L17-L18", + "weight": 1.0, + "_src": "drizzle_readme_immutable_key_ref", + "_tgt": "readme_decision_immutable_keys", + "source": "readme_decision_immutable_keys", + "target": "drizzle_readme_immutable_key_ref" + }, + { + "relation": "rationale_for", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "README.md", + "source_location": "L172", + "weight": 1.0, + "_src": "readme_decision_theme_key", + "_tgt": "apphtml_theme_bootstrap", + "source": "readme_decision_theme_key", + "target": "apphtml_theme_bootstrap" + }, + { + "relation": "rationale_for", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "drizzle/README.md", + "source_location": "L13-L18", + "weight": 1.0, + "_src": "drizzle_readme_review_rationale", + "_tgt": "drizzle_readme_migrations", + "source": "drizzle_readme_migrations", + "target": "drizzle_readme_review_rationale" + }, + { + "relation": "rationale_for", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "drizzle/README.md", + "source_location": "L16", + "weight": 1.0, + "_src": "drizzle_readme_concurrently_note", + "_tgt": "drizzle_readme_review_rationale", + "source": "drizzle_readme_review_rationale", + "target": "drizzle_readme_concurrently_note" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "src/app.html", + "source_location": "L7-L14", + "weight": 1.0, + "_src": "apphtml_root", + "_tgt": "apphtml_theme_bootstrap", + "source": "apphtml_root", + "target": "apphtml_theme_bootstrap" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "src/app.html", + "source_location": "L15,L18", + "weight": 1.0, + "_src": "apphtml_root", + "_tgt": "apphtml_sveltekit_placeholders", + "source": "apphtml_root", + "target": "apphtml_sveltekit_placeholders" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "src/app.html", + "source_location": "L17", + "weight": 1.0, + "_src": "apphtml_root", + "_tgt": "apphtml_tailwind_body_classes", + "source": "apphtml_root", + "target": "apphtml_tailwind_body_classes" + }, + { + "relation": "references", + "confidence": "EXTRACTED", + "confidence_score": 1.0, + "source_file": "src/app.html", + "source_location": "L17", + "weight": 1.0, + "_src": "apphtml_root", + "_tgt": "apphtml_preload_hover", + "source": "apphtml_root", + "target": "apphtml_preload_hover" + } + ], + "hyperedges": [ + { + "id": "auth_session_flow", + "label": "Session auth flow (cookie, hash, hook, gate)", + "nodes": [ + "readme_auth_model", + "readme_sha256_cookie_hash", + "readme_sliding_renewal", + "readme_hooks_server", + "readme_layout_app_group" + ], + "relation": "participate_in", + "confidence": "EXTRACTED", + "confidence_score": 0.95, + "source_file": "README.md" + }, + { + "id": "storage_abstraction_stack", + "label": "Storage abstraction (adapter, local impl, signed URLs, file route)", + "nodes": [ + "readme_storage_adapter", + "readme_local_disk_storage", + "readme_hmac_signed_urls", + "readme_api_files_route", + "readme_storage_model" + ], + "relation": "implement", + "confidence": "EXTRACTED", + "confidence_score": 0.95, + "source_file": "README.md" + }, + { + "id": "theme_propagation_pattern", + "label": "Cross-sibling theme propagation via localStorage", + "nodes": [ + "readme_decision_theme_key", + "apphtml_theme_bootstrap", + "readme_buildfor_life_budget", + "readme_buildfor_life_repair" + ], + "relation": "form", + "confidence": "INFERRED", + "confidence_score": 0.8, + "source_file": "README.md" + } + ] +} \ No newline at end of file diff --git a/graphify-out/manifest.json b/graphify-out/manifest.json new file mode 100644 index 0000000..5882c25 --- /dev/null +++ b/graphify-out/manifest.json @@ -0,0 +1,191 @@ +{ + "drizzle.config.ts": 1776759714.513955, + "svelte.config.js": 1776759709.852201, + "vite.config.ts": 1776759710.9294431, + "scripts\\create-user.ts": 1776764431.9558957, + "scripts\\diag-user.ts": 1776764326.9098525, + "scripts\\seed\\system-asset-types.ts": 1776912939.322366, + "src\\app.d.ts": 1776759729.3791924, + "src\\hooks.server.ts": 1776759818.2697544, + "src\\lib\\accounts.ts": 1776920290.934606, + "src\\lib\\field-types.ts": 1776920825.6922204, + "src\\lib\\notifications.ts": 1776931229.9228654, + "src\\lib\\roles.ts": 1776926943.3422728, + "src\\lib\\components\\CustomFieldsForm.svelte": 1776913252.4056394, + "src\\lib\\components\\Sidebar.svelte": 1776927136.3547218, + "src\\lib\\components\\TabNav.svelte": 1776913159.6860654, + "src\\lib\\components\\ThemeToggle.svelte": 1776759845.5468612, + "src\\lib\\components\\TopBar.svelte": 1776931220.6103387, + "src\\lib\\server\\csv.ts": 1776917156.6442757, + "src\\lib\\server\\custom-fields-form.ts": 1776913256.9887655, + "src\\lib\\server\\env.ts": 1776931062.8713133, + "src\\lib\\server\\markdown.ts": 1776916373.4274423, + "src\\lib\\server\\auth\\guards.ts": 1776926889.9894013, + "src\\lib\\server\\auth\\session.ts": 1776759799.3712118, + "src\\lib\\server\\auth\\types.ts": 1776759774.7241707, + "src\\lib\\server\\db\\client.ts": 1776759750.8801546, + "src\\lib\\server\\db\\schema\\accounts.ts": 1776919823.744308, + "src\\lib\\server\\db\\schema\\assets.ts": 1776918525.6835947, + "src\\lib\\server\\db\\schema\\checklists.ts": 1776913879.7155764, + "src\\lib\\server\\db\\schema\\decisions.ts": 1776915253.4674976, + "src\\lib\\server\\db\\schema\\documents.ts": 1776912778.9190943, + "src\\lib\\server\\db\\schema\\index.ts": 1776930971.0629141, + "src\\lib\\server\\db\\schema\\maintenance.ts": 1776913892.3164668, + "src\\lib\\server\\db\\schema\\notifications.ts": 1776930892.1852467, + "src\\lib\\server\\db\\schema\\projects.ts": 1776915246.2953787, + "src\\lib\\server\\db\\schema\\properties.ts": 1776912743.139987, + "src\\lib\\server\\db\\schema\\rooms.ts": 1776918599.0392416, + "src\\lib\\server\\db\\schema\\tenancy.ts": 1776930946.3660817, + "src\\lib\\server\\db\\schema\\wiki.ts": 1776916193.8209262, + "src\\lib\\server\\db\\schema\\_shared.ts": 1776930905.6758077, + "src\\lib\\server\\notifications\\email.ts": 1776931016.4405794, + "src\\lib\\server\\notifications\\matrix.ts": 1776931029.1186867, + "src\\lib\\server\\services\\accounts.ts": 1776920323.303991, + "src\\lib\\server\\services\\asset-types.ts": 1776920794.8900447, + "src\\lib\\server\\services\\assets.ts": 1776918741.5526845, + "src\\lib\\server\\services\\checklists.ts": 1776914015.1864648, + "src\\lib\\server\\services\\companies.ts": 1776926919.6478693, + "src\\lib\\server\\services\\decisions.ts": 1776931161.1573675, + "src\\lib\\server\\services\\documents.ts": 1776913042.152006, + "src\\lib\\server\\services\\maintenance.ts": 1776914056.7123244, + "src\\lib\\server\\services\\notifications.ts": 1776931111.3630683, + "src\\lib\\server\\services\\projects.ts": 1776915354.1029918, + "src\\lib\\server\\services\\properties.ts": 1776913017.5585654, + "src\\lib\\server\\services\\rooms.ts": 1776918691.0627687, + "src\\lib\\server\\services\\tasks.ts": 1776931148.6006575, + "src\\lib\\server\\services\\users.ts": 1776926913.1441553, + "src\\lib\\server\\services\\wiki.ts": 1776916401.6874013, + "src\\lib\\server\\services\\work-packages.ts": 1776915364.4542458, + "src\\lib\\server\\storage\\index.ts": 1776917120.850884, + "src\\lib\\server\\storage\\local.ts": 1776759811.0783958, + "src\\lib\\server\\storage\\s3.ts": 1776917106.507278, + "src\\lib\\server\\storage\\types.ts": 1776759799.6621113, + "src\\lib\\server\\validation\\custom-fields.ts": 1776912977.936982, + "src\\lib\\utils\\email.ts": 1776759835.741046, + "src\\routes\\+error.svelte": 1776759893.5137482, + "src\\routes\\+layout.svelte": 1776759890.2237513, + "src\\routes\\(app)\\+layout.server.ts": 1776931198.4231248, + "src\\routes\\(app)\\+layout.svelte": 1776931205.7321944, + "src\\routes\\(app)\\+page.server.ts": 1776914283.3064556, + "src\\routes\\(app)\\+page.svelte": 1776917220.5957947, + "src\\routes\\(app)\\admin\\asset-types\\+page.server.ts": 1776913422.799801, + "src\\routes\\(app)\\admin\\asset-types\\+page.svelte": 1776920833.7043724, + "src\\routes\\(app)\\admin\\asset-types\\new\\+page.server.ts": 1776920840.2482536, + "src\\routes\\(app)\\admin\\asset-types\\new\\+page.svelte": 1776920854.0103273, + "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.server.ts": 1776920890.0830934, + "src\\routes\\(app)\\admin\\asset-types\\[id]\\+page.svelte": 1776921035.9995456, + "src\\routes\\(app)\\admin\\company\\+page.server.ts": 1776931312.5847213, + "src\\routes\\(app)\\admin\\company\\+page.svelte": 1776931319.603905, + "src\\routes\\(app)\\admin\\company\\new\\+page.server.ts": 1776927025.5308478, + "src\\routes\\(app)\\admin\\company\\new\\+page.svelte": 1776927036.3036556, + "src\\routes\\(app)\\admin\\users\\+page.server.ts": 1776926953.8580477, + "src\\routes\\(app)\\admin\\users\\+page.svelte": 1776926979.3827615, + "src\\routes\\(app)\\admin\\users\\new\\+page.server.ts": 1776926984.284234, + "src\\routes\\(app)\\admin\\users\\new\\+page.svelte": 1776926999.823408, + "src\\routes\\(app)\\assets\\+page.server.ts": 1776913265.146846, + "src\\routes\\(app)\\assets\\+page.svelte": 1776917178.3600802, + "src\\routes\\(app)\\assets\\export.csv\\+server.ts": 1776917162.3927114, + "src\\routes\\(app)\\assets\\new\\+page.server.ts": 1776918891.8736053, + "src\\routes\\(app)\\assets\\new\\+page.svelte": 1776918929.98384, + "src\\routes\\(app)\\assets\\[id]\\+layout.server.ts": 1776918845.937803, + "src\\routes\\(app)\\assets\\[id]\\+layout.svelte": 1776918861.8613749, + "src\\routes\\(app)\\assets\\[id]\\+page.server.ts": 1776918966.9773984, + "src\\routes\\(app)\\assets\\[id]\\+page.svelte": 1776918977.7803142, + "src\\routes\\(app)\\assets\\[id]\\documents\\+page.server.ts": 1776913388.3625875, + "src\\routes\\(app)\\assets\\[id]\\documents\\+page.svelte": 1776913399.9952705, + "src\\routes\\(app)\\assets\\[id]\\history\\+page.server.ts": 1776913363.7884815, + "src\\routes\\(app)\\assets\\[id]\\history\\+page.svelte": 1776913369.8365443, + "src\\routes\\(app)\\assets\\[id]\\label\\+page.server.ts": 1776917034.6195388, + "src\\routes\\(app)\\assets\\[id]\\label\\+page.svelte": 1776917046.470442, + "src\\routes\\(app)\\assets\\[id]\\logs\\+page.server.ts": 1776913374.1819277, + "src\\routes\\(app)\\assets\\[id]\\logs\\+page.svelte": 1776913381.2650573, + "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.server.ts": 1776918070.6355166, + "src\\routes\\(app)\\assets\\[id]\\maintenance\\+page.svelte": 1776914405.4364533, + "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.server.ts": 1776914228.1214633, + "src\\routes\\(app)\\assets\\[id]\\maintenance\\events\\[eventId]\\+page.svelte": 1776914244.2005274, + "src\\routes\\(app)\\assets\\[id]\\move\\+page.server.ts": 1776919009.9313874, + "src\\routes\\(app)\\assets\\[id]\\move\\+page.svelte": 1776919026.728069, + "src\\routes\\(app)\\checklists\\+page.server.ts": 1776914079.817349, + "src\\routes\\(app)\\checklists\\+page.svelte": 1776914094.8200972, + "src\\routes\\(app)\\checklists\\[id]\\+page.server.ts": 1776914100.9521067, + "src\\routes\\(app)\\checklists\\[id]\\+page.svelte": 1776914121.4203167, + "src\\routes\\(app)\\maintenance\\+page.server.ts": 1776914255.4049551, + "src\\routes\\(app)\\maintenance\\+page.svelte": 1776917184.8656871, + "src\\routes\\(app)\\maintenance\\export.csv\\+server.ts": 1776917166.6201513, + "src\\routes\\(app)\\notifications\\+page.server.ts": 1776931234.3767867, + "src\\routes\\(app)\\notifications\\+page.svelte": 1776931247.0849652, + "src\\routes\\(app)\\projects\\+page.server.ts": 1776915423.3344169, + "src\\routes\\(app)\\projects\\+page.svelte": 1776915434.5388634, + "src\\routes\\(app)\\projects\\new\\+page.server.ts": 1776918064.9852977, + "src\\routes\\(app)\\projects\\new\\+page.svelte": 1776915457.2821925, + "src\\routes\\(app)\\projects\\[id]\\+layout.server.ts": 1776915464.0169995, + "src\\routes\\(app)\\projects\\[id]\\+layout.svelte": 1776916623.3352191, + "src\\routes\\(app)\\projects\\[id]\\+page.server.ts": 1776915476.949084, + "src\\routes\\(app)\\projects\\[id]\\+page.svelte": 1776915496.4709525, + "src\\routes\\(app)\\projects\\[id]\\assets\\+page.server.ts": 1776915627.8771396, + "src\\routes\\(app)\\projects\\[id]\\assets\\+page.svelte": 1776915636.780885, + "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.server.ts": 1776915599.6791656, + "src\\routes\\(app)\\projects\\[id]\\decisions\\+page.svelte": 1776917192.7825646, + "src\\routes\\(app)\\projects\\[id]\\decisions\\export.csv\\+server.ts": 1776917170.5648644, + "src\\routes\\(app)\\projects\\[id]\\documents\\+page.server.ts": 1776915643.2300684, + "src\\routes\\(app)\\projects\\[id]\\documents\\+page.svelte": 1776915654.9358807, + "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.server.ts": 1776916531.6101334, + "src\\routes\\(app)\\projects\\[id]\\wiki\\+page.svelte": 1776916541.2650218, + "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.server.ts": 1776918073.6948636, + "src\\routes\\(app)\\projects\\[id]\\wiki\\new\\+page.svelte": 1776916560.5026286, + "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.server.ts": 1776916564.134221, + "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\+page.svelte": 1776916572.3334942, + "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.server.ts": 1776918076.7685654, + "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\edit\\+page.svelte": 1776916586.95377, + "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.server.ts": 1776916588.9756079, + "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\history\\+page.svelte": 1776916595.4693499, + "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts": 1776916598.7071426, + "src\\routes\\(app)\\projects\\[id]\\wiki\\[slug]\\revisions\\[rev]\\+page.svelte": 1776916604.7904158, + "src\\routes\\(app)\\projects\\[id]\\work\\+page.server.ts": 1776915505.82269, + "src\\routes\\(app)\\projects\\[id]\\work\\+page.svelte": 1776915517.9951062, + "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.server.ts": 1776915525.877059, + "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\+page.svelte": 1776919721.2087197, + "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.server.ts": 1776915557.2259672, + "src\\routes\\(app)\\projects\\[id]\\work\\[wpId]\\[taskId]\\+page.svelte": 1776919694.229038, + "src\\routes\\(app)\\properties\\+page.server.ts": 1776913103.3089087, + "src\\routes\\(app)\\properties\\+page.svelte": 1776913114.269045, + "src\\routes\\(app)\\properties\\new\\+page.server.ts": 1776913120.8220265, + "src\\routes\\(app)\\properties\\new\\+page.svelte": 1776913139.3366928, + "src\\routes\\(app)\\properties\\[id]\\+layout.server.ts": 1776913161.8158467, + "src\\routes\\(app)\\properties\\[id]\\+layout.svelte": 1776919919.0561438, + "src\\routes\\(app)\\properties\\[id]\\+page.server.ts": 1776913174.1071742, + "src\\routes\\(app)\\properties\\[id]\\+page.svelte": 1776913195.5002894, + "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.server.ts": 1776919929.527811, + "src\\routes\\(app)\\properties\\[id]\\accounts\\+page.svelte": 1776920324.8604333, + "src\\routes\\(app)\\properties\\[id]\\assets\\+page.server.ts": 1776913196.9792116, + "src\\routes\\(app)\\properties\\[id]\\assets\\+page.svelte": 1776919046.6825135, + "src\\routes\\(app)\\properties\\[id]\\documents\\+page.server.ts": 1776913212.7782526, + "src\\routes\\(app)\\properties\\[id]\\documents\\+page.svelte": 1776913224.460486, + "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.server.ts": 1776918787.5071964, + "src\\routes\\(app)\\properties\\[id]\\rooms\\+page.svelte": 1776919689.9999452, + "src\\routes\\(app)\\settings\\notifications\\+page.server.ts": 1776931253.4051654, + "src\\routes\\(app)\\settings\\notifications\\+page.svelte": 1776931270.4663363, + "src\\routes\\(app)\\wiki\\+page.server.ts": 1776916429.1431959, + "src\\routes\\(app)\\wiki\\+page.svelte": 1776916439.8088322, + "src\\routes\\(app)\\wiki\\new\\+page.server.ts": 1776918061.846625, + "src\\routes\\(app)\\wiki\\new\\+page.svelte": 1776916458.388637, + "src\\routes\\(app)\\wiki\\[slug]\\+page.server.ts": 1776916462.349511, + "src\\routes\\(app)\\wiki\\[slug]\\+page.svelte": 1776916471.8150628, + "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.server.ts": 1776918067.944296, + "src\\routes\\(app)\\wiki\\[slug]\\edit\\+page.svelte": 1776916486.4311545, + "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.server.ts": 1776916488.2820327, + "src\\routes\\(app)\\wiki\\[slug]\\history\\+page.svelte": 1776916494.4882383, + "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.server.ts": 1776916497.7007258, + "src\\routes\\(app)\\wiki\\[slug]\\revisions\\[rev]\\+page.svelte": 1776916504.0035224, + "src\\routes\\(auth)\\+layout.svelte": 1776759913.2396674, + "src\\routes\\(auth)\\login\\+page.server.ts": 1776759922.3734264, + "src\\routes\\(auth)\\login\\+page.svelte": 1776759928.1185017, + "src\\routes\\api\\documents\\+server.ts": 1776913048.1271062, + "src\\routes\\api\\files\\+server.ts": 1776759936.006362, + "src\\routes\\api\\qr\\+server.ts": 1776917032.1335907, + "src\\routes\\logout\\+server.ts": 1776760388.366003, + "src\\routes\\switch-company\\+server.ts": 1776914979.4505768, + "README.md": 1776761445.7901409, + "drizzle\\README.md": 1776759950.7471619, + "src\\app.html": 1776759722.8929892 +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 38ebbe2..8bee643 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,8 @@ "name": "buildfor-life-ops", "version": "0.1.0", "dependencies": { + "@aws-sdk/client-s3": "^3.1035.0", + "@aws-sdk/s3-request-presigner": "^3.1035.0", "@node-rs/argon2": "^2.0.2", "@oslojs/crypto": "^1.0.1", "@oslojs/encoding": "^1.1.0", @@ -17,7 +19,9 @@ "drizzle-orm": "^0.38.4", "easymde": "^2.20.0", "marked": "^18.0.0", + "nodemailer": "^8.0.5", "pg": "^8.13.1", + "qrcode": "^1.5.4", "sharp": "^0.33.5", "zod": "^3.24.2" }, @@ -27,7 +31,9 @@ "@sveltejs/vite-plugin-svelte": "^5.0.3", "@tailwindcss/vite": "^4.1.3", "@types/node": "^22.10.5", + "@types/nodemailer": "^8.0.0", "@types/pg": "^8.11.11", + "@types/qrcode": "^1.5.6", "drizzle-kit": "^0.30.5", "husky": "^9.1.7", "svelte": "^5.19.0", @@ -41,6 +47,893 @@ "node": ">=20" } }, + "node_modules/@aws-crypto/crc32": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", + "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/crc32c": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-5.2.0.tgz", + "integrity": "sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha1-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-5.2.0.tgz", + "integrity": "sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3": { + "version": "3.1035.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.1035.0.tgz", + "integrity": "sha512-Bh1h96CjHMpxg6Rn2G4EE30YiiBh9w/7WmSZIfwLB0X/6lblaJcHggcryrq2uNN2Bx1/CNErMjTpGQzqhA7Rhg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha1-browser": "5.2.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/credential-provider-node": "^3.972.35", + "@aws-sdk/middleware-bucket-endpoint": "^3.972.10", + "@aws-sdk/middleware-expect-continue": "^3.972.10", + "@aws-sdk/middleware-flexible-checksums": "^3.974.12", + "@aws-sdk/middleware-host-header": "^3.972.10", + "@aws-sdk/middleware-location-constraint": "^3.972.10", + "@aws-sdk/middleware-logger": "^3.972.10", + "@aws-sdk/middleware-recursion-detection": "^3.972.11", + "@aws-sdk/middleware-sdk-s3": "^3.972.33", + "@aws-sdk/middleware-ssec": "^3.972.10", + "@aws-sdk/middleware-user-agent": "^3.972.34", + "@aws-sdk/region-config-resolver": "^3.972.13", + "@aws-sdk/signature-v4-multi-region": "^3.996.21", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-endpoints": "^3.996.8", + "@aws-sdk/util-user-agent-browser": "^3.972.10", + "@aws-sdk/util-user-agent-node": "^3.973.20", + "@smithy/config-resolver": "^4.4.17", + "@smithy/core": "^3.23.16", + "@smithy/eventstream-serde-browser": "^4.2.14", + "@smithy/eventstream-serde-config-resolver": "^4.3.14", + "@smithy/eventstream-serde-node": "^4.2.14", + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/hash-blob-browser": "^4.2.15", + "@smithy/hash-node": "^4.2.14", + "@smithy/hash-stream-node": "^4.2.14", + "@smithy/invalid-dependency": "^4.2.14", + "@smithy/md5-js": "^4.2.14", + "@smithy/middleware-content-length": "^4.2.14", + "@smithy/middleware-endpoint": "^4.4.31", + "@smithy/middleware-retry": "^4.5.4", + "@smithy/middleware-serde": "^4.2.19", + "@smithy/middleware-stack": "^4.2.14", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/node-http-handler": "^4.6.0", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.48", + "@smithy/util-defaults-mode-node": "^4.2.53", + "@smithy/util-endpoints": "^3.4.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.3", + "@smithy/util-stream": "^4.5.24", + "@smithy/util-utf8": "^4.2.2", + "@smithy/util-waiter": "^4.2.16", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/core": { + "version": "3.974.4", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.4.tgz", + "integrity": "sha512-EbVgyzQ83/Lf6oh1O4vYY47tuYw3Aosthh865LNU77KyotKz+uvEBNmsl/bSVS/vG+IU39mCqcOHrnhmhF4lug==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/xml-builder": "^3.972.18", + "@smithy/core": "^3.23.16", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/signature-v4": "^5.3.14", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.3", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/crc64-nvme": { + "version": "3.972.7", + "resolved": "https://registry.npmjs.org/@aws-sdk/crc64-nvme/-/crc64-nvme-3.972.7.tgz", + "integrity": "sha512-QUagVVBbC8gODCF6e1aV0mE2TXWB9Opz4k8EJFdNrujUVQm5R4AjJa1mpOqzwOuROBzqJU9zawzig7M96L8Ejg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.972.30", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.30.tgz", + "integrity": "sha512-dHpeqa29a0cBYq/h59IC2EK3AphLY96nKy4F35kBtiz9GuKDc32UYRTgjZaF8uuJCnqgw9omUZKR+9myyDHC2A==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/types": "^3.973.8", + "@smithy/property-provider": "^4.2.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.972.32", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.32.tgz", + "integrity": "sha512-A+ZTT//Mswkf9DFEM6XlngwOtYdD8X4CUcoZ2wdpgI8cCs9mcGeuhgTwbGJvealub/MeONOaUr3FbRPMKmTDjg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/types": "^3.973.8", + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/node-http-handler": "^4.6.0", + "@smithy/property-provider": "^4.2.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "@smithy/util-stream": "^4.5.24", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.972.34", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.34.tgz", + "integrity": "sha512-MoRc7tLnx3JpFkV2R826enEfBUVN8o9Cc7y3hnbMwiWzL/VJhgfxRQzHkEL9vWorMWP7tibltsRcLoid9fsVdw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/credential-provider-env": "^3.972.30", + "@aws-sdk/credential-provider-http": "^3.972.32", + "@aws-sdk/credential-provider-login": "^3.972.34", + "@aws-sdk/credential-provider-process": "^3.972.30", + "@aws-sdk/credential-provider-sso": "^3.972.34", + "@aws-sdk/credential-provider-web-identity": "^3.972.34", + "@aws-sdk/nested-clients": "^3.997.2", + "@aws-sdk/types": "^3.973.8", + "@smithy/credential-provider-imds": "^4.2.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-login": { + "version": "3.972.34", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.34.tgz", + "integrity": "sha512-XVSklkRRQ/CQDmv3VVFdZRl5hTFgncFhZrLyi0Ai4LZk5o3jpY5HIfuTK7ad7tixPKa+iQmL9+vg9qNyYZB+nw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/nested-clients": "^3.997.2", + "@aws-sdk/types": "^3.973.8", + "@smithy/property-provider": "^4.2.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.972.35", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.35.tgz", + "integrity": "sha512-nVrY7AdGfzYgAa/jd9m06p3ES7QQDaB7zN9c+vXnVXxBRkAs9MjRDPB5AKogWuC6phddltfvHGFqLDJmyU9u/A==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "^3.972.30", + "@aws-sdk/credential-provider-http": "^3.972.32", + "@aws-sdk/credential-provider-ini": "^3.972.34", + "@aws-sdk/credential-provider-process": "^3.972.30", + "@aws-sdk/credential-provider-sso": "^3.972.34", + "@aws-sdk/credential-provider-web-identity": "^3.972.34", + "@aws-sdk/types": "^3.973.8", + "@smithy/credential-provider-imds": "^4.2.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.972.30", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.30.tgz", + "integrity": "sha512-McJPomNTSEo+C6UA3Zq6pFrcyTUaVsoPPBOvbOHAoIFPc8Z2CMLndqFJOnB+9bVFiBTWQLutlVGmrocBbvv4MQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/types": "^3.973.8", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.972.34", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.34.tgz", + "integrity": "sha512-WngYb2K+/yhkDOmDfAOjoCa9Ja3he0DZiAraboKwgWoVRkajDIcDYBCVbUTxtTUldvQoe7VvHLTrBNxvftN1aQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/nested-clients": "^3.997.2", + "@aws-sdk/token-providers": "3.1035.0", + "@aws-sdk/types": "^3.973.8", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.972.34", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.34.tgz", + "integrity": "sha512-5KLUH+XmSNRj6amJiJSrPsCxU5l/PYDfxyqPa1MxWhHoQC3sxvGPrSib3IE+HQlfRA4e2kO0bnJy7HJdjvpuuA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/nested-clients": "^3.997.2", + "@aws-sdk/types": "^3.973.8", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.972.10.tgz", + "integrity": "sha512-Vbc2frZH7wXlMNd+ZZSXUEs/l1Sv8Jj4zUnIfwrYF5lwaLdXHZ9xx4U3rjUcaye3HRhFVc+E5DbBxpRAbB16BA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-arn-parser": "^3.972.3", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-config-provider": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.972.10.tgz", + "integrity": "sha512-2Yn0f1Qiq/DjxYR3wfI3LokXnjOhFM7Ssn4LTdFDIxRMCE6I32MAsVnhPX1cUZsuVA9tiZtwwhlSLAtFGxAZlQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.974.12", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.974.12.tgz", + "integrity": "sha512-v7n0//P95g+UnmyjCpJkDJFB+EP/9Wx/fQJC5BEiK9Y7VHgmhh6RNPVbqDYz9gsz8mXnxzyYt3tCEVJ1kzo01w==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/crc32": "5.2.0", + "@aws-crypto/crc32c": "5.2.0", + "@aws-crypto/util": "5.2.0", + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/crc64-nvme": "^3.972.7", + "@aws-sdk/types": "^3.973.8", + "@smithy/is-array-buffer": "^4.2.2", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-stream": "^4.5.24", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.972.10.tgz", + "integrity": "sha512-IJSsIMeVQ8MMCPbuh1AbltkFhLBLXn7aejzfX5YKT/VLDHn++Dcz8886tXckE+wQssyPUhaXrJhdakO2VilRhg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.972.10.tgz", + "integrity": "sha512-rI3NZvJcEvjoD0+0PI0iUAwlPw2IlSlhyvgBK/3WkKJQE/YiKFedd9dMN2lVacdNxPNhxL/jzQaKQdrGtQagjQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.972.10.tgz", + "integrity": "sha512-OOuGvvz1Dm20SjZo5oEBePFqxt5nf8AwkNDSyUHvD9/bfNASmstcYxFAHUowy4n6Io7mWUZ04JURZwSBvyQanQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.972.11", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.972.11.tgz", + "integrity": "sha512-+zz6f79Kj9V5qFK2P+D8Ehjnw4AhphAlCAsPjUqEcInA9umtSSKMrHbSagEeOIsDNuvVrH98bjRHcyQukTrhaQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@aws/lambda-invoke-store": "^0.2.2", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.972.33", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.972.33.tgz", + "integrity": "sha512-n8Eh/+kq3u/EodLr8n6sQupu03QGjf122RHXCTGLaHSkavz/2beSKpRlq2oDgfmJZNkAkWF113xbyaUmyOd+YA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-arn-parser": "^3.972.3", + "@smithy/core": "^3.23.16", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/signature-v4": "^5.3.14", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "@smithy/util-config-provider": "^4.2.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-stream": "^4.5.24", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-ssec": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.972.10.tgz", + "integrity": "sha512-Gli9A0u8EVVb+5bFDGS/QbSVg28w/wpEidg1ggVcSj65BDTdGR6punsOcVjqdiu1i42WHWo51MCvARPIIz9juw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.972.34", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.972.34.tgz", + "integrity": "sha512-jrmJHyYlTQocR7H4VhvSFhaoedMb2rmlOTvFWD6tNBQ/EVQhTsrNfQUYFuPiOc2wUGxbm5LgCHtnvVmCPgODHw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-endpoints": "^3.996.8", + "@smithy/core": "^3.23.16", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-retry": "^4.3.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/nested-clients": { + "version": "3.997.2", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.2.tgz", + "integrity": "sha512-uGGQO08YetrqfInOKG5atRMrCDRQWRuZ9gGfKY6svPmuE4K7ac+XcbCkpWpjcA7yCYsBaKB/Nly4XKgPXUO1PA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/middleware-host-header": "^3.972.10", + "@aws-sdk/middleware-logger": "^3.972.10", + "@aws-sdk/middleware-recursion-detection": "^3.972.11", + "@aws-sdk/middleware-user-agent": "^3.972.34", + "@aws-sdk/region-config-resolver": "^3.972.13", + "@aws-sdk/signature-v4-multi-region": "^3.996.21", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-endpoints": "^3.996.8", + "@aws-sdk/util-user-agent-browser": "^3.972.10", + "@aws-sdk/util-user-agent-node": "^3.973.20", + "@smithy/config-resolver": "^4.4.17", + "@smithy/core": "^3.23.16", + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/hash-node": "^4.2.14", + "@smithy/invalid-dependency": "^4.2.14", + "@smithy/middleware-content-length": "^4.2.14", + "@smithy/middleware-endpoint": "^4.4.31", + "@smithy/middleware-retry": "^4.5.4", + "@smithy/middleware-serde": "^4.2.19", + "@smithy/middleware-stack": "^4.2.14", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/node-http-handler": "^4.6.0", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.48", + "@smithy/util-defaults-mode-node": "^4.2.53", + "@smithy/util-endpoints": "^3.4.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.3", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.972.13", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.972.13.tgz", + "integrity": "sha512-CvJ2ZIjK/jVD/lbOpowBVElJyC1YxLTIJ13yM0AEo0t2v7swOzGjSA6lJGH+DwZXQhcjUjoYwc8bVYCX5MDr1A==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/config-resolver": "^4.4.17", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/s3-request-presigner": { + "version": "3.1035.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.1035.0.tgz", + "integrity": "sha512-zT+ulZy7/4mqSNL0toB5GuJIBm3nbeGyq/sHPOxIKR3g0bVi5CZupxGvt78yzQeBcXVNZz+orXvaw5ejQ0FGPw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/signature-v4-multi-region": "^3.996.21", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-format-url": "^3.972.10", + "@smithy/middleware-endpoint": "^4.4.31", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.996.21", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.21.tgz", + "integrity": "sha512-3EpT+C0QdmTMB5aVeJ5odWSLt9vg2oGzUXl1xvUazKGlkr9OBYnegNWqhhjGgZdv8RmSi5eS8nqqB+euNP2aqA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/middleware-sdk-s3": "^3.972.33", + "@aws-sdk/types": "^3.973.8", + "@smithy/protocol-http": "^5.3.14", + "@smithy/signature-v4": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.1035.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1035.0.tgz", + "integrity": "sha512-E6IO3Cn+OzBe6Sb5pnubd5Y8qSUMAsVKkD5QSwFfIx5fV1g5SkYwUDRDyPlm90RuIVcCo28wpMJU6W8wXH46Aw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.4", + "@aws-sdk/nested-clients": "^3.997.2", + "@aws-sdk/types": "^3.973.8", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.973.8", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.8.tgz", + "integrity": "sha512-gjlAdtHMbtR9X5iIhVUvbVcy55KnznpC6bkDUWW9z915bi0ckdUr5cjf16Kp6xq0bP5HBD2xzgbL9F9Quv5vUw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/util-arn-parser": { + "version": "3.972.3", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.972.3.tgz", + "integrity": "sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.996.8", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.996.8.tgz", + "integrity": "sha512-oOZHcRDihk5iEe5V25NVWg45b3qEA8OpHWVdU/XQh8Zj4heVPAJqWvMphQnU7LkufmUo10EpvFPZuQMiFLJK3g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-endpoints": "^3.4.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/util-format-url": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.972.10.tgz", + "integrity": "sha512-DEKiHNJVtNxdyTeQspzY+15Po/kHm6sF0Cs4HV9Q2+lplB63+DrvdeiSoOSdWEWAoO2RcY1veoXVDz2tWxWCgQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/querystring-builder": "^4.2.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.965.5", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.965.5.tgz", + "integrity": "sha512-WhlJNNINQB+9qtLtZJcpQdgZw3SCDCpXdUJP7cToGwHbCWCnRckGlc6Bx/OhWwIYFNAn+FIydY8SZ0QmVu3xTQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.972.10.tgz", + "integrity": "sha512-FAzqXvfEssGdSIz8ejatan0bOdx1qefBWKF/gWmVBXIP1HkS7v/wjjaqrAGGKvyihrXTXW00/2/1nTJtxpXz7g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/types": "^4.14.1", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.973.20", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.973.20.tgz", + "integrity": "sha512-owEqyKr0z5hWwk+uHwudwNhyFMZ9f9eSWr/k/XD6yeDCI7hHyc56s4UOY1iBQmoramTbdAY4UCuLLEuKmjVXrg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/middleware-user-agent": "^3.972.34", + "@aws-sdk/types": "^3.973.8", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-config-provider": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/xml-builder": { + "version": "3.972.18", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.18.tgz", + "integrity": "sha512-BMDNVG1ETXRhl1tnisQiYBef3RShJ1kfZA7x7afivTFMLirfHNTb6U71K569HNXhSXbQZsweHvSDZ6euBw8hPA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "fast-xml-parser": "5.5.8", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws/lambda-invoke-store": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.2.4.tgz", + "integrity": "sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@drizzle-team/brocli": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.10.2.tgz", @@ -2120,6 +3013,725 @@ "win32" ] }, + "node_modules/@smithy/chunked-blob-reader": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-5.2.2.tgz", + "integrity": "sha512-St+kVicSyayWQca+I1rGitaOEH6uKgE8IUWoYnnEX26SWdWQcL6LvMSD19Lg+vYHKdT9B2Zuu7rd3i6Wnyb/iw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-4.2.3.tgz", + "integrity": "sha512-jA5k5Udn7Y5717L86h4EIv06wIr3xn8GM1qHRi/Nf31annXcXHJjBKvgztnbn2TxH3xWrPBfgwHsOwZf0UmQWw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-base64": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/config-resolver": { + "version": "4.4.17", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.17.tgz", + "integrity": "sha512-TzDZcAnhTyAHbXVxWZo7/tEcrIeFq20IBk8So3OLOetWpR8EwY/yEqBMBFaJMeyEiREDq4NfEl+qO3OAUD+vbQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-config-provider": "^4.2.2", + "@smithy/util-endpoints": "^3.4.2", + "@smithy/util-middleware": "^4.2.14", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/core": { + "version": "3.23.16", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.23.16.tgz", + "integrity": "sha512-JStomOrINQA1VqNEopLsgcdgwd42au7mykKqVr30XFw89wLt9sDxJDi4djVPRwQmmzyTGy/uOvTc2ultMpFi1w==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-stream": "^4.5.24", + "@smithy/util-utf8": "^4.2.2", + "@smithy/uuid": "^1.1.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.14.tgz", + "integrity": "sha512-Au28zBN48ZAoXdooGUHemuVBrkE+Ie6RPmGNIAJsFqj33Vhb6xAgRifUydZ2aY+M+KaMAETAlKk5NC5h1G7wpg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.3.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-codec": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.2.14.tgz", + "integrity": "sha512-erZq0nOIpzfeZdCyzZjdJb4nVSKLUmSkaQUVkRGQTXs30gyUGeKnrYEg+Xe1W5gE3aReS7IgsvANwVPxSzY6Pw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/crc32": "5.2.0", + "@smithy/types": "^4.14.1", + "@smithy/util-hex-encoding": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.2.14.tgz", + "integrity": "sha512-8IelTCtTctWRbb+0Dcy+C0aICh1qa0qWXqgjcXDmMuCvPJRnv26hiDZoAau2ILOniki65mCPKqOQs/BaWvO4CQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-serde-universal": "^4.2.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "4.3.14", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.3.14.tgz", + "integrity": "sha512-sqHiHpYRYo3FJlaIxD1J8PhbcmJAm7IuM16mVnwSkCToD7g00IBZzKuiLNMGmftULmEUX6/UAz8/NN5uMP8bVA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.2.14.tgz", + "integrity": "sha512-Ht/8BuGlKfFTy0H3+8eEu0vdpwGztCnaLLXtpXNdQqiR7Hj4vFScU3T436vRAjATglOIPjJXronY+1WxxNLSiw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-serde-universal": "^4.2.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-universal": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.2.14.tgz", + "integrity": "sha512-lWyt4T2XQZUZgK3tQ3Wn0w3XBvZsK/vjTuJl6bXbnGZBHH0ZUSONTYiK9TgjTTzU54xQr3DRFwpjmhp0oLm3gg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-codec": "^4.2.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "5.3.17", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.17.tgz", + "integrity": "sha512-bXOvQzaSm6MnmLaWA1elgfQcAtN4UP3vXqV97bHuoOrHQOJiLT3ds6o9eo5bqd0TJfRFpzdGnDQdW3FACiAVdw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.3.14", + "@smithy/querystring-builder": "^4.2.14", + "@smithy/types": "^4.14.1", + "@smithy/util-base64": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/hash-blob-browser": { + "version": "4.2.15", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-4.2.15.tgz", + "integrity": "sha512-0PJ4Al3fg2nM4qKrAIxyNcApgqHAXcBkN8FeizOz69z0rb26uZ6lMESYtxegaTlXB5Hj84JfwMPavMrwDMjucA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/chunked-blob-reader": "^5.2.2", + "@smithy/chunked-blob-reader-native": "^4.2.3", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/hash-node": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.14.tgz", + "integrity": "sha512-8ZBDY2DD4wr+GGjTpPtiglEsqr0lUP+KHqgZcWczFf6qeZ/YRjMIOoQWVQlmwu7EtxKTd8YXD8lblmYcpBIA1g==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "@smithy/util-buffer-from": "^4.2.2", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/hash-stream-node": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-4.2.14.tgz", + "integrity": "sha512-tw4GANWkZPb6+BdD4Fgucqzey2+r73Z/GRo9zklsCdwrnxxumUV83ZIaBDdudV4Ylazw3EPTiJZhpX42105ruQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/invalid-dependency": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.14.tgz", + "integrity": "sha512-c21qJiTSb25xvvOp+H2TNZzPCngrvl5vIPqPB8zQ/DmJF4QWXO19x1dWfMJZ6wZuuWUPPm0gV8C0cU3+ifcWuw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/is-array-buffer": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.2.tgz", + "integrity": "sha512-n6rQ4N8Jj4YTQO3YFrlgZuwKodf4zUFs7EJIWH86pSCWBaAtAGBFfCM7Wx6D2bBJ2xqFNxGBSrUWswT3M0VJow==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/md5-js": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-4.2.14.tgz", + "integrity": "sha512-V2v0vx+h0iUSNG1Alt+GNBMSLGCrl9iVsdd+Ap67HPM9PN479x12V8LkuMoKImNZxn3MXeuyUjls+/7ZACZghA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-content-length": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.14.tgz", + "integrity": "sha512-xhHq7fX4/3lv5NHxLUk3OeEvl0xZ+Ek3qIbWaCL4f9JwgDZEclPBElljaZCAItdGPQl/kSM4LPMOpy1MYgprpw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "4.4.31", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.4.31.tgz", + "integrity": "sha512-KJPdCIN2kOE2aGmqZd7eUTr4WQwOGgtLWgUkswGJggs7rBcQYQjcZMEDa3C0DwbOiXS9L8/wDoQHkfxBYLfiLw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.23.16", + "@smithy/middleware-serde": "^4.2.19", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-middleware": "^4.2.14", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-retry": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.5.4.tgz", + "integrity": "sha512-/z7nIFK+ZRW3Ie/l3NEVGdy34LvmEOzBrtBAvgWZ/4PrKX0xP3kWm8pkfcwUk523SqxZhdbQP9JSXgjF77Uhpw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.23.16", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/service-error-classification": "^4.3.0", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.3", + "@smithy/uuid": "^1.1.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "4.2.19", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.19.tgz", + "integrity": "sha512-Q6y+W9h3iYVMCKWDoVge+OC1LKFqbEKaq8SIWG2X2bWJRpd/6dDLyICcNLT6PbjH3Rr6bmg/SeDB25XFOFfeEw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.23.16", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-stack": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.14.tgz", + "integrity": "sha512-2dvkUKLuFdKsCRmOE4Mn63co0Djtsm+JMh0bYZQupN1pJwMeE8FmQmRLLzzEMN0dnNi7CDCYYH8F0EVwWiPBeA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-config-provider": { + "version": "4.3.14", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.14.tgz", + "integrity": "sha512-S+gFjyo/weSVL0P1b9Ts8C/CwIfNCgUPikk3sl6QVsfE/uUuO+QsF+NsE/JkpvWqqyz1wg7HFdiaZuj5CoBMRg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-http-handler": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.6.0.tgz", + "integrity": "sha512-P734cAoTFtuGfWa/R3jgBnGlURt2w9bYEBwQNMKf58sRM9RShirB2mKwLsVP+jlG/wxpCu8abv8NxdUts8tdLA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.3.14", + "@smithy/querystring-builder": "^4.2.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/property-provider": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.14.tgz", + "integrity": "sha512-WuM31CgfsnQ/10i7NYr0PyxqknD72Y5uMfUMVSniPjbEPceiTErb4eIqJQ+pdxNEAUEWrewrGjIRjVbVHsxZiQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/protocol-http": { + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.14.tgz", + "integrity": "sha512-dN5F8kHx8RNU0r+pCwNmFZyz6ChjMkzShy/zup6MtkRmmix4vZzJdW+di7x//b1LiynIev88FM18ie+wwPcQtQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-builder": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.14.tgz", + "integrity": "sha512-XYA5Z0IqTeF+5XDdh4BBmSA0HvbgVZIyv4cmOoUheDNR57K1HgBp9ukUMx3Cr3XpDHHpLBnexPE3LAtDsZkj2A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "@smithy/util-uri-escape": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-parser": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.14.tgz", + "integrity": "sha512-hr+YyqBD23GVvRxGGrcc/oOeNlK3PzT5Fu4dzrDXxzS1LpFiuL2PQQqKPs87M79aW7ziMs+nvB3qdw77SqE7Lw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/service-error-classification": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.3.0.tgz", + "integrity": "sha512-9jKsBYQRPR0xBLgc2415RsA5PIcP2sis4oBdN9s0D13cg1B1284mNTjx9Yc+BEERXzuPm5ObktI96OxsKh8E9A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.4.9.tgz", + "integrity": "sha512-495/V2I15SHgedSJoDPD23JuSfKAp726ZI1V0wtjB07Wh7q/0tri/0e0DLefZCHgxZonrGKt/OCTpAtP1wE1kQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/signature-v4": { + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.14.tgz", + "integrity": "sha512-1D9Y/nmlVjCeSivCbhZ7hgEpmHyY1h0GvpSZt3l0xcD9JjmjVC1CHOozS6+Gh+/ldMH8JuJ6cujObQqfayAVFA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^4.2.2", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-hex-encoding": "^4.2.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-uri-escape": "^4.2.2", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/smithy-client": { + "version": "4.12.12", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.12.12.tgz", + "integrity": "sha512-daO7SJn4eM6ArbmrEs+/BTbH7af8AEbSL3OMQdcRvvn8tuUcR5rU2n6DgxIV53aXMS42uwK8NgKKCh5XgqYOPQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.23.16", + "@smithy/middleware-endpoint": "^4.4.31", + "@smithy/middleware-stack": "^4.2.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-stream": "^4.5.24", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/types": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.14.1.tgz", + "integrity": "sha512-59b5HtSVrVR/eYNei3BUj3DCPKD/G7EtDDe7OEJE7i7FtQFugYo6MxbotS8mVJkLNVf8gYaAlEBwwtJ9HzhWSg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/url-parser": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.14.tgz", + "integrity": "sha512-p06BiBigJ8bTA3MgnOfCtDUWnAMY0YfedO/GRpmc7p+wg3KW8vbXy1xwSu5ASy0wV7rRYtlfZOIKH4XqfhjSQQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/querystring-parser": "^4.2.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-base64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.2.tgz", + "integrity": "sha512-XRH6b0H/5A3SgblmMa5ErXQ2XKhfbQB+Fm/oyLZ2O2kCUrwgg55bU0RekmzAhuwOjA9qdN5VU2BprOvGGUkOOQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^4.2.2", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.2.tgz", + "integrity": "sha512-JKCrLNOup3OOgmzeaKQwi4ZCTWlYR5H4Gm1r2uTMVBXoemo1UEghk5vtMi1xSu2ymgKVGW631e2fp9/R610ZjQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-node": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.2.3.tgz", + "integrity": "sha512-ZkJGvqBzMHVHE7r/hcuCxlTY8pQr1kMtdsVPs7ex4mMU+EAbcXppfo5NmyxMYi2XU49eqaz56j2gsk4dHHPG/g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-buffer-from": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.2.tgz", + "integrity": "sha512-FDXD7cvUoFWwN6vtQfEta540Y/YBe5JneK3SoZg9bThSoOAC/eGeYEua6RkBgKjGa/sz6Y+DuBZj3+YEY21y4Q==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-config-provider": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.2.2.tgz", + "integrity": "sha512-dWU03V3XUprJwaUIFVv4iOnS1FC9HnMHDfUrlNDSh4315v0cWyaIErP8KiqGVbf5z+JupoVpNM7ZB3jFiTejvQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "4.3.48", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.48.tgz", + "integrity": "sha512-hxVRVPYaRDWa6YQdse1aWX1qrksmLsvNyGBKdc32q4jFzSjxYVNWfstknAfR228TnzS4tzgswXRuYIbhXBuXFQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^4.2.14", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "4.2.53", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.53.tgz", + "integrity": "sha512-ybgCk+9JdBq8pYC8Y6U5fjyS8e4sboyAShetxPNL0rRBtaVl56GSFAxsolVBIea1tXR4LPIzL8i6xqmcf0+DCQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/config-resolver": "^4.4.17", + "@smithy/credential-provider-imds": "^4.2.14", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/smithy-client": "^4.12.12", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-endpoints": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.4.2.tgz", + "integrity": "sha512-a55Tr+3OKld4TTtnT+RhKOQHyPxm3j/xL4OR83WBUhLJaKDS9dnJ7arRMOp3t31dcLhApwG9bgvrRXBHlLdIkg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.2.tgz", + "integrity": "sha512-Qcz3W5vuHK4sLQdyT93k/rfrUwdJ8/HZ+nMUOyGdpeGA1Wxt65zYwi3oEl9kOM+RswvYq90fzkNDahPS8K0OIg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-middleware": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.14.tgz", + "integrity": "sha512-1Su2vj9RYNDEv/V+2E+jXkkwGsgR7dc4sfHn9Z7ruzQHJIEni9zzw5CauvRXlFJfmgcqYP8fWa0dkh2Q2YaQyw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-retry": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.3.3.tgz", + "integrity": "sha512-idjUvd4M9Jj6rXkhqw4H4reHoweuK4ZxYWyOrEp4N2rOF5VtaOlQGLDQJva/8WanNXk9ScQtsAb7o5UHGvFm4A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/service-error-classification": "^4.3.0", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-stream": { + "version": "4.5.24", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.24.tgz", + "integrity": "sha512-na5vv2mBSDzXewLEEoWGI7LQQkfpmFEomBsmOpzLFjqGctm0iMwXY5lAwesY9pIaErkccW0qzEOUcYP+WKneXg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/node-http-handler": "^4.6.0", + "@smithy/types": "^4.14.1", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-buffer-from": "^4.2.2", + "@smithy/util-hex-encoding": "^4.2.2", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-uri-escape": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.2.tgz", + "integrity": "sha512-2kAStBlvq+lTXHyAZYfJRb/DfS3rsinLiwb+69SstC9Vb0s9vNWkRwpnj918Pfi85mzi42sOqdV72OLxWAISnw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-utf8": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.2.tgz", + "integrity": "sha512-75MeYpjdWRe8M5E3AW0O4Cx3UadweS+cwdXjwYGBW5h/gxxnbeZ877sLPX/ZJA9GVTlL/qG0dXP29JWFCD1Ayw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-waiter": { + "version": "4.2.16", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.2.16.tgz", + "integrity": "sha512-GtclrKoZ3Lt7jPQ7aTIYKfjY92OgceScftVnkTsG8e1KV8rkvZgN+ny6YSRhd9hxB8rZtwVbmln7NTvE5O3GmQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/uuid": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@smithy/uuid/-/uuid-1.1.2.tgz", + "integrity": "sha512-O/IEdcCUKkubz60tFbGA7ceITTAJsty+lBjNoorP4Z6XRqaFb/OjQjZODophEcuq68nKm6/0r+6/lLQ+XVpk8g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@standard-schema/spec": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", @@ -2567,6 +4179,16 @@ "undici-types": "~6.21.0" } }, + "node_modules/@types/nodemailer": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-8.0.0.tgz", + "integrity": "sha512-fyf8jWULsCo0d0BuoQ75i6IeoHs47qcqxWc7yUdUcV0pOZGjUTTOvwdG1PRXUDqN/8A64yQdQdnA2pZgcdi+cA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/pg": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.20.0.tgz", @@ -2579,6 +4201,16 @@ "pg-types": "^2.2.0" } }, + "node_modules/@types/qrcode": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.6.tgz", + "integrity": "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", @@ -2615,6 +4247,30 @@ "node": ">=0.4.0" } }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/aria-query": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.1.tgz", @@ -2635,6 +4291,12 @@ "node": ">= 0.4" } }, + "node_modules/bowser": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz", + "integrity": "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==", + "license": "MIT" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2642,6 +4304,15 @@ "dev": true, "license": "MIT" }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -2658,6 +4329,17 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -2781,6 +4463,15 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -2807,6 +4498,12 @@ "dev": true, "license": "MIT" }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, "node_modules/dotenv": { "version": "17.4.2", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", @@ -2986,6 +4683,12 @@ "node": ">= 12" } }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, "node_modules/enhanced-resolve": { "version": "5.20.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz", @@ -3107,6 +4810,41 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-xml-builder": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.5.tgz", + "integrity": "sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.1.3" + } + }, + "node_modules/fast-xml-parser": { + "version": "5.5.8", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.8.tgz", + "integrity": "sha512-Z7Fh2nVQSb2d+poDViM063ix2ZGt9jmY1nWhPfHBOK2Hgnb/OW3P4Et3P/81SEej0J7QbWtJqxO05h8QYfK7LQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "fast-xml-builder": "^1.1.4", + "path-expression-matcher": "^1.2.0", + "strnum": "^2.2.0" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -3125,6 +4863,19 @@ } } }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3171,6 +4922,15 @@ "node": ">= 18.0.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-tsconfig": { "version": "4.14.0", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz", @@ -3242,6 +5002,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -3557,6 +5326,18 @@ "dev": true, "license": "MIT" }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/magic-string": { "version": "0.30.21", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", @@ -3625,6 +5406,75 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/nodemailer": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-8.0.5.tgz", + "integrity": "sha512-0PF8Yb1yZuQfQbq+5/pZJrtF6WQcjTd5/S4JOHs9PGFxuTqoB/icwuB44pOdURHJbRKX1PPoJZtY7R4VUoCC8w==", + "license": "MIT-0", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-expression-matcher": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.5.0.tgz", + "integrity": "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -3741,6 +5591,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/postcss": { "version": "8.5.10", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.10.tgz", @@ -3822,6 +5681,23 @@ "node": ">=0.10.0" } }, + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/readdirp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", @@ -3836,6 +5712,21 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, "node_modules/resolve": { "version": "1.22.12", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", @@ -3938,6 +5829,12 @@ "node": ">=10" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, "node_modules/set-cookie-parser": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-3.1.0.tgz", @@ -4061,6 +5958,44 @@ "node": ">= 10.x" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strnum": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz", + "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -4187,8 +6122,7 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "optional": true + "license": "0BSD" }, "node_modules/tsx": { "version": "4.21.0", @@ -5271,6 +7205,26 @@ "node": "^16.13.0 || >=18.0.0" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -5280,6 +7234,47 @@ "node": ">=0.4" } }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/zimmerframe": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.4.tgz", diff --git a/package.json b/package.json index 9f45526..989bae1 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,8 @@ "prepare": "husky" }, "dependencies": { + "@aws-sdk/client-s3": "^3.1035.0", + "@aws-sdk/s3-request-presigner": "^3.1035.0", "@node-rs/argon2": "^2.0.2", "@oslojs/crypto": "^1.0.1", "@oslojs/encoding": "^1.1.0", @@ -27,7 +29,9 @@ "drizzle-orm": "^0.38.4", "easymde": "^2.20.0", "marked": "^18.0.0", + "nodemailer": "^8.0.5", "pg": "^8.13.1", + "qrcode": "^1.5.4", "sharp": "^0.33.5", "zod": "^3.24.2" }, @@ -37,7 +41,9 @@ "@sveltejs/vite-plugin-svelte": "^5.0.3", "@tailwindcss/vite": "^4.1.3", "@types/node": "^22.10.5", + "@types/nodemailer": "^8.0.0", "@types/pg": "^8.11.11", + "@types/qrcode": "^1.5.6", "drizzle-kit": "^0.30.5", "husky": "^9.1.7", "svelte": "^5.19.0", diff --git a/scripts/seed/system-asset-types.ts b/scripts/seed/system-asset-types.ts new file mode 100644 index 0000000..876a644 --- /dev/null +++ b/scripts/seed/system-asset-types.ts @@ -0,0 +1,380 @@ +import 'dotenv/config'; +import { and, eq, isNull, sql } from 'drizzle-orm'; +import { pool } from '../../src/lib/server/db/client'; +import { db } from '../../src/lib/server/db/client'; +import { assetTypes, assetFieldDefs } from '../../src/lib/server/db/schema/assets'; + +type FieldType = + | 'text' + | 'textarea' + | 'int' + | 'float' + | 'bool' + | 'date' + | 'ip' + | 'cidr' + | 'mac' + | 'enum' + | 'multi_enum' + | 'url' + | 'email' + | 'asset_ref'; + +interface SeedField { + key: string; + label: string; + type: FieldType; + required?: boolean; + enumValues?: string[]; + unit?: string; + helpText?: string; +} + +interface SeedType { + slug: string; + name: string; + icon?: string; + description?: string; + fields: SeedField[]; +} + +// Fields shared by anything mounted on a network. +const NETWORK_FIELDS: SeedField[] = [ + { key: 'mgmt_ip', label: 'Management IP', type: 'ip' }, + { key: 'subnet', label: 'Subnet (CIDR)', type: 'cidr' }, + { key: 'vlan', label: 'VLAN ID', type: 'int' }, + { key: 'mac', label: 'MAC address', type: 'mac' }, + { key: 'hostname', label: 'Hostname', type: 'text' } +]; + +const SYSTEM_ASSET_TYPES: SeedType[] = [ + // --- Network gear --- + { + slug: 'switch', + name: 'Switch', + icon: 'network-switch', + description: 'Managed or unmanaged network switch.', + fields: [ + ...NETWORK_FIELDS, + { key: 'port_count', label: 'Port count', type: 'int' }, + { key: 'poe', label: 'PoE', type: 'bool' }, + { key: 'uplink_port', label: 'Uplink port', type: 'text' } + ] + }, + { + slug: 'router', + name: 'Router', + icon: 'router', + fields: [ + ...NETWORK_FIELDS, + { key: 'wan_ip', label: 'WAN IP', type: 'ip' }, + { key: 'wan_provider', label: 'WAN provider', type: 'text' } + ] + }, + { + slug: 'access_point', + name: 'Access point', + icon: 'wifi', + fields: [ + ...NETWORK_FIELDS, + { key: 'ssid', label: 'SSID', type: 'text' }, + { key: 'band', label: 'Band', type: 'enum', enumValues: ['2.4', '5', '6', 'tri'] } + ] + }, + { + slug: 'firewall', + name: 'Firewall', + icon: 'shield', + fields: [...NETWORK_FIELDS, { key: 'firmware', label: 'Firmware', type: 'text' }] + }, + { + slug: 'patch_panel', + name: 'Patch panel', + icon: 'panel', + fields: [ + { key: 'port_count', label: 'Port count', type: 'int' }, + { key: 'rack_position', label: 'Rack U position', type: 'text' } + ] + }, + // --- Compute --- + { + slug: 'server', + name: 'Server', + icon: 'server', + fields: [ + ...NETWORK_FIELDS, + { key: 'os', label: 'OS', type: 'text' }, + { key: 'cpu', label: 'CPU', type: 'text' }, + { key: 'ram_gb', label: 'RAM', type: 'int', unit: 'GB' }, + { key: 'disk_tb', label: 'Disk', type: 'float', unit: 'TB' } + ] + }, + // --- HVAC --- + { + slug: 'ac_unit', + name: 'Air conditioner', + icon: 'snowflake', + fields: [ + { key: 'capacity_btu', label: 'Capacity', type: 'int', unit: 'BTU/h' }, + { + key: 'system_kind', + label: 'System type', + type: 'enum', + enumValues: ['split', 'multi_split', 'cassette', 'central', 'window'] + }, + { key: 'refrigerant', label: 'Refrigerant', type: 'text' }, + { key: 'indoor_unit_count', label: 'Indoor units', type: 'int' } + ] + }, + { + slug: 'air_filter', + name: 'Air filter', + icon: 'filter', + fields: [ + { key: 'size', label: 'Size', type: 'text', placeholder: '24x24x2 in' } as SeedField, + { + key: 'rating', + label: 'Rating', + type: 'enum', + enumValues: ['MERV-8', 'MERV-11', 'MERV-13', 'HEPA', 'ULPA'] + }, + { key: 'replace_interval_days', label: 'Replace every', type: 'int', unit: 'days' } + ] + }, + // --- Life safety --- + { + slug: 'fire_alarm_panel', + name: 'Fire alarm panel', + icon: 'alarm', + fields: [ + { key: 'panel_model', label: 'Panel model', type: 'text' }, + { key: 'zone_count', label: 'Zones', type: 'int' }, + { key: 'last_inspection', label: 'Last inspection', type: 'date' } + ] + }, + { + slug: 'smoke_detector', + name: 'Smoke detector', + icon: 'smoke', + fields: [ + { + key: 'sensor_type', + label: 'Sensor type', + type: 'enum', + enumValues: ['ionization', 'photoelectric', 'dual'] + }, + { + key: 'power', + label: 'Power', + type: 'enum', + enumValues: ['battery', 'hardwired', 'hardwired_with_backup'] + } + ] + }, + // --- Sensors / metering --- + { + slug: 'env_sensor', + name: 'Environment sensor', + icon: 'sensor', + fields: [ + ...NETWORK_FIELDS, + { + key: 'metrics', + label: 'Metrics', + type: 'multi_enum', + enumValues: ['temperature', 'humidity', 'co2', 'pm25', 'pressure', 'lux', 'noise'] + } + ] + }, + { + slug: 'camera', + name: 'Camera', + icon: 'camera', + fields: [ + ...NETWORK_FIELDS, + { key: 'resolution', label: 'Resolution', type: 'text', placeholder: '4K' } as SeedField, + { + key: 'mount', + label: 'Mount', + type: 'enum', + enumValues: ['ceiling', 'wall', 'pole', 'desk'] + }, + { key: 'has_ptz', label: 'PTZ', type: 'bool' } + ] + }, + // --- Power --- + { + slug: 'ups', + name: 'UPS', + icon: 'battery', + fields: [ + { key: 'capacity_va', label: 'Capacity', type: 'int', unit: 'VA' }, + { key: 'battery_install_date', label: 'Battery installed', type: 'date' } + ] + }, + { + slug: 'generator', + name: 'Generator', + icon: 'generator', + fields: [ + { key: 'capacity_kw', label: 'Capacity', type: 'float', unit: 'kW' }, + { + key: 'fuel', + label: 'Fuel', + type: 'enum', + enumValues: ['diesel', 'gas', 'lpg'] + }, + { key: 'tank_litres', label: 'Tank', type: 'int', unit: 'L' } + ] + }, + { + slug: 'solar_inverter', + name: 'Solar inverter', + icon: 'sun', + fields: [ + ...NETWORK_FIELDS, + { key: 'capacity_kw', label: 'Capacity', type: 'float', unit: 'kW' }, + { key: 'panel_count', label: 'Panel count', type: 'int' } + ] + }, + // --- Plumbing / mechanical --- + { + slug: 'pump', + name: 'Pump', + icon: 'pump', + fields: [ + { key: 'flow_rate_lpm', label: 'Flow rate', type: 'float', unit: 'L/min' }, + { key: 'head_m', label: 'Head', type: 'float', unit: 'm' } + ] + }, + { + slug: 'valve', + name: 'Valve', + icon: 'valve', + fields: [ + { + key: 'kind', + label: 'Type', + type: 'enum', + enumValues: ['ball', 'gate', 'check', 'butterfly', 'solenoid'] + }, + { key: 'size_mm', label: 'Size', type: 'int', unit: 'mm' } + ] + } +]; + +async function upsertSystemType(seed: SeedType): Promise<{ id: string; created: boolean }> { + // System rows have company_id IS NULL. + const [existing] = await db + .select() + .from(assetTypes) + .where(and(isNull(assetTypes.companyId), eq(assetTypes.slug, seed.slug))) + .limit(1); + + if (existing) { + // Heal name/icon/description drift without bumping schema_version. + const drift = + existing.name !== seed.name || + (existing.icon ?? null) !== (seed.icon ?? null) || + (existing.description ?? null) !== (seed.description ?? null); + if (drift) { + await db + .update(assetTypes) + .set({ + name: seed.name, + icon: seed.icon ?? null, + description: seed.description ?? null + }) + .where(eq(assetTypes.id, existing.id)); + } + return { id: existing.id, created: false }; + } + + const [created] = await db + .insert(assetTypes) + .values({ + companyId: null, + name: seed.name, + slug: seed.slug, + icon: seed.icon ?? null, + description: seed.description ?? null + }) + .returning({ id: assetTypes.id }); + return { id: created.id, created: true }; +} + +async function syncFieldDefs(typeId: string, seedFields: SeedField[]): Promise { + const existing = await db + .select() + .from(assetFieldDefs) + .where(eq(assetFieldDefs.assetTypeId, typeId)); + const byKey = new Map(existing.map((d) => [d.key, d])); + + for (let i = 0; i < seedFields.length; i++) { + const f = seedFields[i]; + const want = { + label: f.label, + type: f.type, + required: f.required ?? false, + order: i, + enumValues: f.enumValues ?? null, + unit: f.unit ?? null, + placeholder: null as string | null, + helpText: f.helpText ?? null, + deprecatedAt: null as Date | null + }; + const cur = byKey.get(f.key); + if (!cur) { + await db.insert(assetFieldDefs).values({ + assetTypeId: typeId, + key: f.key, + ...want + }); + continue; + } + const drift = + cur.label !== want.label || + cur.type !== want.type || + cur.required !== want.required || + cur.order !== want.order || + JSON.stringify(cur.enumValues ?? null) !== JSON.stringify(want.enumValues) || + (cur.unit ?? null) !== want.unit || + (cur.helpText ?? null) !== want.helpText || + cur.deprecatedAt !== null; + if (drift) { + await db + .update(assetFieldDefs) + .set(want) + .where(eq(assetFieldDefs.id, cur.id)); + } + byKey.delete(f.key); + } + + // Anything left in byKey is a field the seed no longer declares — soft-deprecate. + for (const orphan of byKey.values()) { + if (orphan.deprecatedAt === null) { + await db + .update(assetFieldDefs) + .set({ deprecatedAt: sql`now()` }) + .where(eq(assetFieldDefs.id, orphan.id)); + } + } +} + +async function main(): Promise { + console.log(`Seeding ${SYSTEM_ASSET_TYPES.length} system asset types…`); + let created = 0; + for (const seed of SYSTEM_ASSET_TYPES) { + const { id, created: wasCreated } = await upsertSystemType(seed); + await syncFieldDefs(id, seed.fields); + if (wasCreated) created++; + console.log(` ${wasCreated ? '+' : '·'} ${seed.slug}`); + } + console.log(`Done. ${created} new, ${SYSTEM_ASSET_TYPES.length - created} updated.`); + await pool.end(); +} + +main().catch((err) => { + console.error(err); + process.exit(1); +}); diff --git a/src/lib/accounts.ts b/src/lib/accounts.ts new file mode 100644 index 0000000..51eee44 --- /dev/null +++ b/src/lib/accounts.ts @@ -0,0 +1,34 @@ +// Safe to import from both server and browser code. Keep this module free of +// server-only dependencies (no DB, no env, no fs). + +export type AccountKind = + | 'water' + | 'electricity' + | 'gas' + | 'internet' + | 'phone' + | 'cable' + | 'waste' + | 'other'; + +export const ACCOUNT_KINDS: readonly AccountKind[] = [ + 'electricity', + 'water', + 'gas', + 'internet', + 'phone', + 'cable', + 'waste', + 'other' +] as const; + +export const ACCOUNT_KIND_LABEL: Record = { + water: 'Water', + electricity: 'Electricity', + gas: 'Gas', + internet: 'Internet', + phone: 'Phone', + cable: 'Cable TV', + waste: 'Waste', + other: 'Other' +}; diff --git a/src/lib/components/CustomFieldsForm.svelte b/src/lib/components/CustomFieldsForm.svelte new file mode 100644 index 0000000..90cd9eb --- /dev/null +++ b/src/lib/components/CustomFieldsForm.svelte @@ -0,0 +1,102 @@ + + +{#if visibleDefs.length === 0} +

This asset type has no custom fields.

+{:else} +
+ {#each visibleDefs as d} +
+ + + {#if d.type === 'textarea'} + + {:else if d.type === 'bool'} + + {:else if d.type === 'enum'} + + {:else if d.type === 'multi_enum'} +
+ {#each d.enumValues ?? [] as opt} + + {/each} +
+ {:else} + + {/if} + + {#if d.helpText} +

{d.helpText}

+ {/if} +
+ {/each} +
+{/if} diff --git a/src/lib/components/Sidebar.svelte b/src/lib/components/Sidebar.svelte index 05fe785..1c0dbf1 100644 --- a/src/lib/components/Sidebar.svelte +++ b/src/lib/components/Sidebar.svelte @@ -1,22 +1,22 @@ + + diff --git a/src/lib/components/TopBar.svelte b/src/lib/components/TopBar.svelte index 6ee8167..2498c9b 100644 --- a/src/lib/components/TopBar.svelte +++ b/src/lib/components/TopBar.svelte @@ -1,13 +1,16 @@
@@ -18,13 +22,19 @@
+ {#if data.upcomingSoon.length > 0} +
+

Due in the next 14 days

+ + View all → +
+ {/if} +
-

Phase 0 complete.

-

Auth, layout shell, storage interface, and the tenancy schema are wired. The remaining schema modules (projects, properties, assets, maintenance, checklists, decisions, documents, wiki, audit) land in Phase 1.

+

Phase 5 (partial) shipped.

+

+ Printable QR labels per asset, S3 storage backend (switch via STORAGE_BACKEND=s3), + and CSV exports for assets / maintenance / project decisions are live. Notifications and cross-app APIs land in a later session. +

diff --git a/src/routes/(app)/admin/asset-types/+page.server.ts b/src/routes/(app)/admin/asset-types/+page.server.ts new file mode 100644 index 0000000..dff49db --- /dev/null +++ b/src/routes/(app)/admin/asset-types/+page.server.ts @@ -0,0 +1,28 @@ +import { error } from '@sveltejs/kit'; +import { asc, eq, isNull, or, sql } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { assetTypes, assetFieldDefs } from '$lib/server/db/schema/assets'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals }) => { + if (!locals.company) throw error(401); + const types = await db + .select({ + id: assetTypes.id, + name: assetTypes.name, + slug: assetTypes.slug, + icon: assetTypes.icon, + description: assetTypes.description, + companyId: assetTypes.companyId, + schemaVersion: assetTypes.schemaVersion, + fieldCount: sql`( + select count(*)::int from ${assetFieldDefs} + where ${assetFieldDefs.assetTypeId} = ${assetTypes.id} + and ${assetFieldDefs.deprecatedAt} is null + )` + }) + .from(assetTypes) + .where(or(isNull(assetTypes.companyId), eq(assetTypes.companyId, locals.company.id))!) + .orderBy(asc(assetTypes.name)); + return { types }; +}; diff --git a/src/routes/(app)/admin/asset-types/+page.svelte b/src/routes/(app)/admin/asset-types/+page.svelte new file mode 100644 index 0000000..adc972b --- /dev/null +++ b/src/routes/(app)/admin/asset-types/+page.svelte @@ -0,0 +1,53 @@ + + +
+
+
+

Asset types

+

+ Catalog of "kinds of thing" you can track. System types are shared across every company; company types are yours to add and edit. +

+
+ + + New type + +
+ +
+ + + + + + + + + + + + {#each data.types as t} + + + + + + + + {/each} + +
NameSlugScopeFieldsSchema v
+ {t.name} + {#if t.description}
{t.description}
{/if} +
{t.slug} + {#if t.companyId === null} + system + {:else} + company + {/if} + {t.fieldCount}v{t.schemaVersion}
+
+
diff --git a/src/routes/(app)/admin/asset-types/[id]/+page.server.ts b/src/routes/(app)/admin/asset-types/[id]/+page.server.ts new file mode 100644 index 0000000..3a008f1 --- /dev/null +++ b/src/routes/(app)/admin/asset-types/[id]/+page.server.ts @@ -0,0 +1,192 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { loadTypeWithFields } from '$lib/server/services/assets'; +import { + addFieldDef, + deleteCompanyAssetType, + removeFieldDef, + updateCompanyAssetType, + updateFieldDef, + type FieldType +} from '$lib/server/services/asset-types'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const tf = await loadTypeWithFields(params.id); + if (!tf) throw error(404, 'Asset type not found'); + // Tenant guard: company-scoped types must belong to the active company. + if (tf.type.companyId !== null && tf.type.companyId !== locals.company.id) { + throw error(404, 'Asset type not found'); + } + const editable = tf.type.companyId === locals.company.id; + return { type: tf.type, fields: tf.fields, editable }; +}; + +const FIELD_TYPES = [ + 'text', + 'textarea', + 'int', + 'float', + 'bool', + 'date', + 'ip', + 'cidr', + 'mac', + 'enum', + 'multi_enum', + 'url', + 'email', + 'asset_ref' +] as const; + +const MetaSchema = z.object({ + name: z.string().trim().min(1).max(128), + icon: z.string().trim().max(64).optional().or(z.literal('')), + description: z.string().trim().max(2000).optional().or(z.literal('')) +}); + +const FieldSchema = z.object({ + key: z.string().trim().max(64).optional().or(z.literal('')), + label: z.string().trim().min(1).max(128), + type: z.enum(FIELD_TYPES), + required: z.string().optional(), + enum_values: z.string().trim().max(2000).optional().or(z.literal('')), + unit: z.string().trim().max(32).optional().or(z.literal('')), + placeholder: z.string().trim().max(255).optional().or(z.literal('')), + help_text: z.string().trim().max(2000).optional().or(z.literal('')) +}); + +const FieldPatchSchema = z.object({ + label: z.string().trim().min(1).max(128), + required: z.string().optional(), + enum_values: z.string().trim().max(2000).optional().or(z.literal('')), + unit: z.string().trim().max(32).optional().or(z.literal('')), + placeholder: z.string().trim().max(255).optional().or(z.literal('')), + help_text: z.string().trim().max(2000).optional().or(z.literal('')) +}); + +function parseEnumValues(raw: string | undefined): string[] | null { + if (!raw) return null; + const parts = raw + .split(/[,\n]/) + .map((s) => s.trim()) + .filter(Boolean); + return parts.length > 0 ? parts : null; +} + +export const actions: Actions = { + saveMeta: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = MetaSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + try { + await updateCompanyAssetType(locals.company.id, params.id, { + name: parsed.data.name, + icon: parsed.data.icon || null, + description: parsed.data.description || null + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + + deleteType: async ({ locals, params }) => { + if (!locals.company) throw error(401); + try { + await deleteCompanyAssetType(locals.company.id, params.id); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message }); + } + throw redirect(303, '/admin/asset-types'); + }, + + addField: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = FieldSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + try { + await addFieldDef(locals.company.id, params.id, { + key: v.key || v.label, + label: v.label, + type: v.type as FieldType, + required: v.required === 'true', + enumValues: parseEnumValues(v.enum_values), + unit: v.unit || null, + placeholder: v.placeholder || null, + helpText: v.help_text || null + }); + } catch (e) { + const msg = (e as Error).message; + if (msg.includes('asset_field_defs_type_key_uq')) { + return fail(400, { error: 'A field with that key already exists on this type.' }); + } + return fail(400, { error: msg }); + } + return { ok: true }; + }, + + updateField: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const fieldId = String(form.get('field_id') ?? ''); + if (!fieldId) return fail(400, { error: 'Missing field_id' }); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = FieldPatchSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + const enumVals = parseEnumValues(v.enum_values); + try { + await updateFieldDef(locals.company.id, fieldId, { + label: v.label, + required: v.required === 'true', + enumValues: raw.enum_values !== undefined ? enumVals : undefined, + unit: v.unit || null, + placeholder: v.placeholder || null, + helpText: v.help_text || null + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + + removeField: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const fieldId = String(form.get('field_id') ?? ''); + const force = form.get('force') === 'true'; + if (!fieldId) return fail(400, { error: 'Missing field_id' }); + try { + const res = await removeFieldDef(locals.company.id, fieldId, { force }); + return { + ok: true, + deprecated: !res.hardDeleted + }; + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + }, + + restoreField: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const fieldId = String(form.get('field_id') ?? ''); + if (!fieldId) return fail(400, { error: 'Missing field_id' }); + try { + await updateFieldDef(locals.company.id, fieldId, { + deprecatedAt: null + } as never); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + } +}; diff --git a/src/routes/(app)/admin/asset-types/[id]/+page.svelte b/src/routes/(app)/admin/asset-types/[id]/+page.svelte new file mode 100644 index 0000000..4d196fb --- /dev/null +++ b/src/routes/(app)/admin/asset-types/[id]/+page.svelte @@ -0,0 +1,291 @@ + + +
+
+ ← all asset types +
+
+

{data.type.name}

+
+ slug {data.type.slug} + schema v{data.type.schemaVersion} + + {#if data.editable} + company type + {:else} + system type · read-only + {/if} + +
+ {#if data.type.description} +

{data.type.description}

+ {/if} +
+ {#if data.editable && !editingMeta} + + {/if} +
+
+ + {#if form?.error} +
{form.error}
+ {/if} + + {#if editingMeta} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') editingMeta = false; + }} + class="space-y-3 rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800"> + + + +
+ + +
+
+ {/if} + +
+
+

Fields

+ {#if data.editable} + + {/if} +
+ + {#if adding} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') { + adding = false; + newFieldType = 'text'; + } + }} + class="mb-3 grid gap-3 rounded-lg border border-gray-200 bg-white p-4 sm:grid-cols-2 dark:border-gray-700 dark:bg-gray-800"> + + + + + {#if needsEnumValues(newFieldType)} + + {/if} + + + +
+ +
+
+ {/if} + + {#if data.fields.length === 0} +

No fields defined.

+ {:else} +
+ + + + + + + + + {#if data.editable} + + {/if} + + + + {#each data.fields as f} + + {#if editingFieldId === f.id} + + + {:else} + + + + + + {#if data.editable} + + {/if} + {/if} + + {/each} + +
KeyLabelTypeOptionsRequired 
{f.key} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') editingFieldId = null; + }} + class="grid gap-2 sm:grid-cols-2"> + + + + + {#if needsEnumValues(f.type as FieldType)} + + {/if} + + +
+ + +
+
+
{f.key} + {f.label} + {#if f.unit}({f.unit}){/if} + {#if f.deprecatedAt}deprecated{/if} + {FIELD_TYPE_LABEL[f.type as FieldType] ?? f.type} + {#if f.enumValues && f.enumValues.length > 0} + {f.enumValues.join(', ')} + {:else} + — + {/if} + + {#if f.required} + required + {:else} + optional + {/if} + +
+ + {#if f.deprecatedAt} +
+ + +
+ {:else} +
+ + +
+ {/if} +
+
+
+ {#if data.editable} +

+ Field key and type are immutable after creation — changing them against existing JSONB data would corrupt it. Remove + re-add (and optionally script a JSONB migration) if you need to change a field's shape. +

+ {/if} + {/if} +
+ + {#if data.editable} +
+ + {#if confirmingDelete} +
+

Hard-delete this asset type and all of its field defs. Only works if no assets of this type exist — move or soft-delete them first.

+
+ +
+
+ {/if} +
+ {/if} +
diff --git a/src/routes/(app)/admin/asset-types/new/+page.server.ts b/src/routes/(app)/admin/asset-types/new/+page.server.ts new file mode 100644 index 0000000..f326dfb --- /dev/null +++ b/src/routes/(app)/admin/asset-types/new/+page.server.ts @@ -0,0 +1,41 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { createCompanyAssetType } from '$lib/server/services/asset-types'; +import type { Actions } from './$types'; + +const Schema = z.object({ + name: z.string().trim().min(1).max(128), + slug: z.string().trim().max(64).optional().or(z.literal('')), + icon: z.string().trim().max(64).optional().or(z.literal('')), + description: z.string().trim().max(2000).optional().or(z.literal('')) +}); + +export const actions: Actions = { + default: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) { + return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input', values: raw }); + } + const v = parsed.data; + try { + const { id } = await createCompanyAssetType({ + companyId: locals.company.id, + name: v.name, + slug: v.slug || null, + icon: v.icon || null, + description: v.description || null + }); + throw redirect(303, `/admin/asset-types/${id}`); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + const msg = (e as Error).message ?? 'create failed'; + if (msg.includes('asset_types_company_slug_uq')) { + return fail(400, { error: 'A type with that slug already exists in this company.', values: raw }); + } + return fail(400, { error: msg, values: raw }); + } + } +}; diff --git a/src/routes/(app)/admin/asset-types/new/+page.svelte b/src/routes/(app)/admin/asset-types/new/+page.svelte new file mode 100644 index 0000000..2bb535b --- /dev/null +++ b/src/routes/(app)/admin/asset-types/new/+page.svelte @@ -0,0 +1,59 @@ + + +
+
+ ← all asset types +

New asset type

+

+ Custom company-scoped type. After creating it you can add typed fields + (IP, enum, int, etc.) on the next screen. +

+
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error} +
{form.error}
+ {/if} + + + + + +
+ Cancel + +
+
+
diff --git a/src/routes/(app)/admin/company/+page.server.ts b/src/routes/(app)/admin/company/+page.server.ts new file mode 100644 index 0000000..e300944 --- /dev/null +++ b/src/routes/(app)/admin/company/+page.server.ts @@ -0,0 +1,76 @@ +import { fail } from '@sveltejs/kit'; +import { z } from 'zod'; +import { requireAdmin, requireCompany } from '$lib/server/auth/guards'; +import { getCompany, updateCompany } from '$lib/server/services/companies'; +import type { Actions, PageServerLoad } from './$types'; + +const Schema = z.object({ + name: z.string().trim().min(1).max(255), + slug: z.string().trim().min(1).max(128), + default_currency: z.string().trim().length(3).optional().or(z.literal('')), + matrix_room_id: z.string().trim().max(255).optional().or(z.literal('')) +}); + +interface CompanySettings { + default_currency?: string | null; + matrix_room_id?: string | null; +} + +function parseSettings(raw: string | null | undefined): CompanySettings { + if (!raw) return {}; + try { + return JSON.parse(raw) as CompanySettings; + } catch { + return {}; + } +} + +export const load: PageServerLoad = async ({ locals }) => { + const { company } = requireCompany(locals); + const full = await getCompany(company.id); + if (!full) throw new Error('active company row missing'); + return { + fullCompany: full, + settings: parseSettings(full.settings), + isAdmin: company.role === 'admin' + }; +}; + +export const actions: Actions = { + save: async ({ request, locals }) => { + const { company } = requireAdmin(locals); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + const existing = await getCompany(company.id); + if (!existing) return fail(404, { error: 'Company not found' }); + const settings = parseSettings(existing.settings); + if (v.default_currency) settings.default_currency = v.default_currency.toUpperCase(); + else delete settings.default_currency; + if (v.matrix_room_id) { + const trimmed = v.matrix_room_id.trim(); + if (!/^![^:\s]+:[^:\s]+$/.test(trimmed)) { + return fail(400, { error: 'Matrix room id must look like !roomid:server' }); + } + settings.matrix_room_id = trimmed; + } else { + delete settings.matrix_room_id; + } + try { + await updateCompany(company.id, { + name: v.name, + slug: v.slug, + settings: Object.keys(settings).length > 0 ? JSON.stringify(settings) : null + }); + } catch (e) { + const msg = (e as Error).message; + if (msg.includes('companies_slug_unique')) { + return fail(400, { error: 'A company with that slug already exists.' }); + } + return fail(400, { error: msg }); + } + return { ok: true }; + } +}; diff --git a/src/routes/(app)/admin/company/+page.svelte b/src/routes/(app)/admin/company/+page.svelte new file mode 100644 index 0000000..0390646 --- /dev/null +++ b/src/routes/(app)/admin/company/+page.svelte @@ -0,0 +1,64 @@ + + +
+
+
+

Company settings

+

+ {data.isAdmin ? 'Edit the active company.' : 'Read-only — only admins can change these.'} +

+
+ + Create new company +
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error} +
{form.error}
+ {:else if form?.ok} +
Saved.
+ {/if} + + + + + + {#if data.isAdmin} +
+ +
+ {/if} +
+
diff --git a/src/routes/(app)/admin/company/new/+page.server.ts b/src/routes/(app)/admin/company/new/+page.server.ts new file mode 100644 index 0000000..1f3e66c --- /dev/null +++ b/src/routes/(app)/admin/company/new/+page.server.ts @@ -0,0 +1,43 @@ +import { fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { requireCompany } from '$lib/server/auth/guards'; +import { setActiveCompany } from '$lib/server/auth/session'; +import { createCompanyWithAdmin } from '$lib/server/services/companies'; +import type { Actions } from './$types'; + +const Schema = z.object({ + name: z.string().trim().min(1).max(255), + slug: z.string().trim().max(128).optional().or(z.literal('')), + default_currency: z.string().trim().length(3).optional().or(z.literal('')) +}); + +export const actions: Actions = { + default: async ({ request, locals }) => { + const { user, sessionId } = requireCompany(locals); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input', values: raw }); + const v = parsed.data; + const settingsObj: Record = {}; + if (v.default_currency) settingsObj.default_currency = v.default_currency.toUpperCase(); + try { + const { id } = await createCompanyWithAdmin({ + name: v.name, + slug: v.slug || null, + settings: Object.keys(settingsObj).length ? JSON.stringify(settingsObj) : null, + creatorUserId: user.id + }); + // Switch the session's active company so the creator lands in the new tenant. + await setActiveCompany(sessionId, id); + throw redirect(303, '/admin/company'); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + const msg = (e as Error).message; + if (msg.includes('companies_slug_unique')) { + return fail(400, { error: 'A company with that slug already exists.', values: raw }); + } + return fail(400, { error: msg, values: raw }); + } + } +}; diff --git a/src/routes/(app)/admin/company/new/+page.svelte b/src/routes/(app)/admin/company/new/+page.svelte new file mode 100644 index 0000000..f2ff962 --- /dev/null +++ b/src/routes/(app)/admin/company/new/+page.svelte @@ -0,0 +1,53 @@ + + +
+
+ ← company settings +

Create new company

+

+ You'll be added as the admin automatically. Your session switches to the new + company once it's created — use the sidebar to switch back later. +

+
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error} +
{form.error}
+ {/if} + + + + +
+ Cancel + +
+
+
diff --git a/src/routes/(app)/admin/users/+page.server.ts b/src/routes/(app)/admin/users/+page.server.ts new file mode 100644 index 0000000..12abf15 --- /dev/null +++ b/src/routes/(app)/admin/users/+page.server.ts @@ -0,0 +1,89 @@ +import { fail } from '@sveltejs/kit'; +import { requireAdmin, requireCompany } from '$lib/server/auth/guards'; +import { + listCompanyUsers, + removeUserFromCompany, + resetUserPassword, + setUserActive, + setUserRoleInCompany, + updateDisplayName, + type CompanyRole +} from '$lib/server/services/users'; +import type { Actions, PageServerLoad } from './$types'; + +const ROLES = ['admin', 'manager', 'user', 'viewer'] as const; + +export const load: PageServerLoad = async ({ locals }) => { + const { company, user } = requireCompany(locals); + const rows = await listCompanyUsers(company.id); + return { users: rows, selfUserId: user.id, isAdmin: company.role === 'admin' }; +}; + +export const actions: Actions = { + setRole: async ({ request, locals }) => { + const { company } = requireAdmin(locals); + const form = await request.formData(); + const userId = String(form.get('user_id') ?? ''); + const role = String(form.get('role') ?? ''); + if (!userId || !ROLES.includes(role as CompanyRole)) { + return fail(400, { error: 'Invalid request' }); + } + try { + await setUserRoleInCompany(company.id, userId, role as CompanyRole); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + remove: async ({ request, locals }) => { + const { company } = requireAdmin(locals); + const form = await request.formData(); + const userId = String(form.get('user_id') ?? ''); + if (!userId) return fail(400, { error: 'Missing user_id' }); + try { + await removeUserFromCompany(company.id, userId); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + setActive: async ({ request, locals }) => { + const { company } = requireAdmin(locals); + const form = await request.formData(); + const userId = String(form.get('user_id') ?? ''); + const active = form.get('active') === 'true'; + if (!userId) return fail(400, { error: 'Missing user_id' }); + try { + await setUserActive(company.id, userId, active); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + rename: async ({ request, locals }) => { + const { company } = requireAdmin(locals); + const form = await request.formData(); + const userId = String(form.get('user_id') ?? ''); + const displayName = String(form.get('display_name') ?? ''); + if (!userId) return fail(400, { error: 'Missing user_id' }); + try { + await updateDisplayName(company.id, userId, displayName); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + resetPassword: async ({ request, locals }) => { + const { company } = requireAdmin(locals); + const form = await request.formData(); + const userId = String(form.get('user_id') ?? ''); + const password = String(form.get('password') ?? ''); + if (!userId) return fail(400, { error: 'Missing user_id' }); + try { + await resetUserPassword(company.id, userId, password); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + } +}; diff --git a/src/routes/(app)/admin/users/+page.svelte b/src/routes/(app)/admin/users/+page.svelte new file mode 100644 index 0000000..e804ba2 --- /dev/null +++ b/src/routes/(app)/admin/users/+page.svelte @@ -0,0 +1,137 @@ + + +
+
+
+

Users

+

+ {data.isAdmin + ? 'Manage who has access to this company and what they can do.' + : 'Read-only view — only admins can invite or change roles.'} +

+
+ {#if data.isAdmin} + + + Invite user + + {/if} +
+ + {#if form?.error} +
{form.error}
+ {/if} + +
+ + + + + + + + + {#if data.isAdmin} + + {/if} + + + + {#each data.users as u} + {@const isSelf = u.userId === data.selfUserId} + + + + + + + {#if data.isAdmin} + + {/if} + + {/each} + +
NameEmailRoleLast loginStatusActions
+ {#if renamingId === u.userId} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') renamingId = null; + }} + class="flex items-center gap-2"> + + + + +
+ {:else} + {u.displayName} + {#if isSelf}(you){/if} + {/if} +
{u.email} + {#if data.isAdmin && !isSelf} +
+ + +
+ {:else} + {u.role} + {/if} +
+ {u.lastLoginAt ? new Date(u.lastLoginAt).toLocaleDateString() : 'never'} + + {#if u.isActive} + active + {:else} + inactive + {/if} + + {#if resettingId === u.userId} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') { resettingId = null; resetPw = ''; } + }} + class="flex items-center justify-end gap-2"> + + + + +
+ {:else} +
+ + + {#if !isSelf} +
+ + + +
+
+ + +
+ {/if} +
+ {/if} +
+
+
diff --git a/src/routes/(app)/admin/users/new/+page.server.ts b/src/routes/(app)/admin/users/new/+page.server.ts new file mode 100644 index 0000000..665be04 --- /dev/null +++ b/src/routes/(app)/admin/users/new/+page.server.ts @@ -0,0 +1,45 @@ +import { fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { requireAdmin } from '$lib/server/auth/guards'; +import { + createUserAndAddToCompany, + type CompanyRole +} from '$lib/server/services/users'; +import type { Actions } from './$types'; + +const Schema = z.object({ + email: z.string().trim().email(), + display_name: z.string().trim().min(1).max(255), + password: z.string().min(8).max(256), + role: z.enum(['admin', 'manager', 'user', 'viewer']) +}); + +export const load = async ({ locals }: { locals: App.Locals }) => { + requireAdmin(locals); +}; + +export const actions: Actions = { + default: async ({ request, locals }) => { + const { company } = requireAdmin(locals); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) { + return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input', values: raw }); + } + const v = parsed.data; + try { + await createUserAndAddToCompany({ + companyId: company.id, + email: v.email, + displayName: v.display_name, + password: v.password, + role: v.role as CompanyRole + }); + throw redirect(303, '/admin/users'); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message, values: raw }); + } + } +}; diff --git a/src/routes/(app)/admin/users/new/+page.svelte b/src/routes/(app)/admin/users/new/+page.svelte new file mode 100644 index 0000000..877bf6d --- /dev/null +++ b/src/routes/(app)/admin/users/new/+page.svelte @@ -0,0 +1,70 @@ + + +
+
+ ← back to users +

Invite user

+

+ Creates the user (or reuses an existing one with the same email) and adds them to this company. + Share the temporary password out-of-band; they can change it after logging in. +

+
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error} +
{form.error}
+ {/if} + + + + +
+ Role * +
+ {#each COMPANY_ROLES as r} + + {/each} +
+
+
+ Cancel + +
+
+
diff --git a/src/routes/(app)/assets/+page.server.ts b/src/routes/(app)/assets/+page.server.ts new file mode 100644 index 0000000..140de3c --- /dev/null +++ b/src/routes/(app)/assets/+page.server.ts @@ -0,0 +1,27 @@ +import { error } from '@sveltejs/kit'; +import { and, asc, isNull, or, sql } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { assetTypes } from '$lib/server/db/schema/assets'; +import { listAssets } from '$lib/server/services/assets'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, url }) => { + if (!locals.company) throw error(400, 'No active company'); + const typeSlug = url.searchParams.get('type') ?? undefined; + const q = url.searchParams.get('q') ?? undefined; + + const types = await db + .select({ id: assetTypes.id, name: assetTypes.name, slug: assetTypes.slug }) + .from(assetTypes) + .where(or(isNull(assetTypes.companyId), sql`${assetTypes.companyId} = ${locals.company.id}`)!) + .orderBy(asc(assetTypes.name)); + + const assets = await listAssets({ + companyId: locals.company.id, + typeSlug, + q, + limit: 200 + }); + + return { assets, types, filterType: typeSlug ?? '', filterQ: q ?? '' }; +}; diff --git a/src/routes/(app)/assets/+page.svelte b/src/routes/(app)/assets/+page.svelte new file mode 100644 index 0000000..47c7c14 --- /dev/null +++ b/src/routes/(app)/assets/+page.svelte @@ -0,0 +1,74 @@ + + +
+
+
+

Assets

+

+ Everything you track — switches, ACs, filters, sensors, generators… +

+
+ + + New asset + +
+ +
+ + + + + Export CSV → + +
+ + {#if data.assets.length === 0} +
+

No assets match.

+

Adjust the filter above, or add a new asset.

+
+ {:else} +
+ + + + + + + + + + + + {#each data.assets as a} + + + + + + + + {/each} + +
NameTypeTagSerialUpdated
+ {a.name} + {a.assetTypeName}{a.tag ?? '—'}{a.serialNumber ?? '—'}{new Date(a.updatedAt).toLocaleDateString()}
+
+ {/if} +
diff --git a/src/routes/(app)/assets/[id]/+layout.server.ts b/src/routes/(app)/assets/[id]/+layout.server.ts new file mode 100644 index 0000000..772dacd --- /dev/null +++ b/src/routes/(app)/assets/[id]/+layout.server.ts @@ -0,0 +1,73 @@ +import { error } from '@sveltejs/kit'; +import { and, eq, isNull } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { assets } from '$lib/server/db/schema/assets'; +import { properties } from '$lib/server/db/schema/properties'; +import { projects } from '$lib/server/db/schema/projects'; +import { propertyFloors, propertyRooms } from '$lib/server/db/schema/rooms'; +import { loadTypeWithFields } from '$lib/server/services/assets'; +import type { LayoutServerLoad } from './$types'; + +export const load: LayoutServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + + const [asset] = await db + .select() + .from(assets) + .where( + and( + eq(assets.id, params.id), + eq(assets.companyId, locals.company.id), + isNull(assets.deletedAt) + ) + ) + .limit(1); + if (!asset) throw error(404, 'Asset not found'); + + const tf = await loadTypeWithFields(asset.assetTypeId); + if (!tf) throw error(500, 'Asset type missing'); + + let currentLocationName: string | null = null; + let currentLocationHref: string | null = null; + let currentRoomLabel: string | null = null; + if (asset.currentPropertyId) { + const [p] = await db + .select({ name: properties.name }) + .from(properties) + .where(eq(properties.id, asset.currentPropertyId)) + .limit(1); + currentLocationName = p?.name ?? null; + currentLocationHref = `/properties/${asset.currentPropertyId}`; + if (asset.currentRoomId) { + const [r] = await db + .select({ + name: propertyRooms.name, + floorLabel: propertyFloors.label + }) + .from(propertyRooms) + .leftJoin(propertyFloors, eq(propertyFloors.id, propertyRooms.floorId)) + .where(eq(propertyRooms.id, asset.currentRoomId)) + .limit(1); + if (r) { + currentRoomLabel = r.floorLabel ? `Floor ${r.floorLabel} · ${r.name}` : r.name; + } + } + } else if (asset.currentProjectId) { + const [p] = await db + .select({ name: projects.name }) + .from(projects) + .where(eq(projects.id, asset.currentProjectId)) + .limit(1); + currentLocationName = p?.name ?? null; + currentLocationHref = `/projects/${asset.currentProjectId}/assets`; + } + + return { + asset, + assetType: tf.type, + fieldDefs: tf.fields, + currentLocationName, + currentLocationHref, + currentRoomLabel + }; +}; diff --git a/src/routes/(app)/assets/[id]/+layout.svelte b/src/routes/(app)/assets/[id]/+layout.svelte new file mode 100644 index 0000000..cf3c39d --- /dev/null +++ b/src/routes/(app)/assets/[id]/+layout.svelte @@ -0,0 +1,47 @@ + + +
+
+
+
+ {data.assetType.name} +
+

+ {data.asset.name} +

+
+ {#if data.currentLocationName && data.currentLocationHref} + at {data.currentLocationName} ({data.asset.currentContainerKind}) + {/if} + {#if data.currentRoomLabel} + · {data.currentRoomLabel} + {/if} + {#if data.asset.tag}· tag {data.asset.tag}{/if} + {#if data.asset.serialNumber}· s/n {data.asset.serialNumber}{/if} +
+
+ + Print label + +
+ + + + {@render children()} +
diff --git a/src/routes/(app)/assets/[id]/+page.server.ts b/src/routes/(app)/assets/[id]/+page.server.ts new file mode 100644 index 0000000..d96eca6 --- /dev/null +++ b/src/routes/(app)/assets/[id]/+page.server.ts @@ -0,0 +1,87 @@ +import { error, fail, redirect } from '@sveltejs/kit'; +import { and, asc, eq, isNull } from 'drizzle-orm'; +import { z } from 'zod'; +import { db } from '$lib/server/db/client'; +import { propertyFloors, propertyRooms } from '$lib/server/db/schema/rooms'; +import { loadTypeWithFields, softDeleteAsset, updateAsset } from '$lib/server/services/assets'; +import { gatherCustomFieldsFromForm } from '$lib/server/custom-fields-form'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, parent }) => { + if (!locals.company) throw error(401); + const { asset } = await parent(); + let rooms: Array<{ id: string; name: string; floorLabel: string | null }> = []; + if (asset.currentContainerKind === 'property' && asset.currentPropertyId) { + rooms = await db + .select({ + id: propertyRooms.id, + name: propertyRooms.name, + floorLabel: propertyFloors.label + }) + .from(propertyRooms) + .leftJoin(propertyFloors, eq(propertyFloors.id, propertyRooms.floorId)) + .where( + and( + eq(propertyRooms.propertyId, asset.currentPropertyId), + isNull(propertyRooms.deletedAt) + ) + ) + .orderBy(asc(propertyFloors.order), asc(propertyFloors.label), asc(propertyRooms.name)); + } + return { rooms }; +}; + +const PatchSchema = z.object({ + name: z.string().trim().min(1).max(255), + tag: z.string().trim().max(64).optional().or(z.literal('')), + serial_number: z.string().trim().max(128).optional().or(z.literal('')), + manufacturer: z.string().trim().max(128).optional().or(z.literal('')), + model: z.string().trim().max(128).optional().or(z.literal('')), + purchased_at: z.string().trim().optional().or(z.literal('')), + room_id: z.string().optional().or(z.literal('')) +}); + +const e2n = (s: string | undefined) => (!s ? null : s); + +export const actions: Actions = { + save: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = PatchSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + + const tf = await loadTypeWithFields(form.get('asset_type_id') as string); + if (!tf) return fail(400, { error: 'Asset type not found.' }); + const cf = gatherCustomFieldsFromForm(form, tf.fields); + + // Room field is only included when a property asset is being edited. + // Empty string = clear room; uuid = set; undefined = leave alone. + const roomPatch: { roomId?: string | null } = {}; + if (form.has('room_id')) { + roomPatch.roomId = v.room_id ? v.room_id : null; + } + + try { + await updateAsset(locals.company.id, params.id, { + name: v.name, + tag: e2n(v.tag), + serialNumber: e2n(v.serial_number), + manufacturer: e2n(v.manufacturer), + model: e2n(v.model), + purchasedAt: v.purchased_at ? new Date(v.purchased_at) : null, + customFields: cf, + ...roomPatch + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + delete: async ({ locals, params }) => { + if (!locals.company) throw error(401); + await softDeleteAsset(locals.company.id, params.id); + throw redirect(303, '/assets'); + } +}; diff --git a/src/routes/(app)/assets/[id]/+page.svelte b/src/routes/(app)/assets/[id]/+page.svelte new file mode 100644 index 0000000..9ca77e7 --- /dev/null +++ b/src/routes/(app)/assets/[id]/+page.svelte @@ -0,0 +1,110 @@ + + +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-6 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" +> + {#if form?.error} +
{form.error}
+ {:else if form?.ok} +
Saved.
+ {/if} + + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ {#if a.currentContainerKind === 'property'} +
+ + + {#if data.rooms.length === 0} +

This property has no rooms yet. Add them from the property's Rooms tab.

+ {/if} +
+ {/if} +
+ +
+
{data.assetType.name} details
+ } /> +
+ +
+ + +
+
+ +{#if confirmingDelete} +
+

Delete this asset?

+

Soft-deletes the asset; history and documents stay on disk.

+
+ + +
+
+{/if} diff --git a/src/routes/(app)/assets/[id]/documents/+page.server.ts b/src/routes/(app)/assets/[id]/documents/+page.server.ts new file mode 100644 index 0000000..ff7881a --- /dev/null +++ b/src/routes/(app)/assets/[id]/documents/+page.server.ts @@ -0,0 +1,58 @@ +import { error, fail } from '@sveltejs/kit'; +import { + deleteDocument, + listDocumentsForScope, + signedUrlForDocument, + uploadDocument +} from '$lib/server/services/documents'; +import type { Actions, PageServerLoad } from './$types'; + +const MAX_BYTES = 50 * 1024 * 1024; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const docs = await listDocumentsForScope(locals.company.id, 'asset', params.id); + const enriched = await Promise.all( + docs.map(async (d) => ({ + ...d, + downloadUrl: await signedUrlForDocument(d, 'attachment'), + previewUrl: await signedUrlForDocument(d, 'inline') + })) + ); + return { documents: enriched }; +}; + +export const actions: Actions = { + upload: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const file = form.get('file'); + if (!(file instanceof File) || file.size === 0) { + return fail(400, { error: 'Pick a file to upload.' }); + } + if (file.size > MAX_BYTES) return fail(413, { error: 'File too large (max 50 MB).' }); + const buf = Buffer.from(await file.arrayBuffer()); + try { + await uploadDocument({ + companyId: locals.company.id, + uploadedBy: locals.user.id, + scopeType: 'asset', + scopeId: params.id, + filename: file.name || 'upload.bin', + mimeType: file.type || 'application/octet-stream', + body: buf + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + delete: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + await deleteDocument(locals.company.id, id); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/assets/[id]/documents/+page.svelte b/src/routes/(app)/assets/[id]/documents/+page.svelte new file mode 100644 index 0000000..025710c --- /dev/null +++ b/src/routes/(app)/assets/[id]/documents/+page.svelte @@ -0,0 +1,63 @@ + + +
+
{ + uploading = true; + return ({ update }) => update().finally(() => (uploading = false)); + }} + class="rounded-lg border border-dashed border-gray-300 bg-white p-4 dark:border-gray-700 dark:bg-gray-800" + > +
+ + +
+ {#if form?.error}

{form.error}

{/if} + {#if form?.ok}

Done.

{/if} +
+ + {#if data.documents.length === 0} +
+ No documents attached. +
+ {:else} +
    + {#each data.documents as d} +
  • +
    + {d.filename} +
    + {d.mimeType} · {fmtSize(d.sizeBytes)} · {new Date(d.uploadedAt).toLocaleString()} +
    +
    +
    + Download +
    + + +
    +
    +
  • + {/each} +
+ {/if} +
diff --git a/src/routes/(app)/assets/[id]/history/+page.server.ts b/src/routes/(app)/assets/[id]/history/+page.server.ts new file mode 100644 index 0000000..2297c0f --- /dev/null +++ b/src/routes/(app)/assets/[id]/history/+page.server.ts @@ -0,0 +1,31 @@ +import { error } from '@sveltejs/kit'; +import { aliasedTable, desc, eq } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { assetLocationHistory } from '$lib/server/db/schema/assets'; +import { properties } from '$lib/server/db/schema/properties'; +import { users } from '$lib/server/db/schema/tenancy'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const fromProp = aliasedTable(properties, 'from_prop'); + const toProp = aliasedTable(properties, 'to_prop'); + const rows = await db + .select({ + id: assetLocationHistory.id, + fromKind: assetLocationHistory.fromKind, + fromPropertyName: fromProp.name, + toKind: assetLocationHistory.toKind, + toPropertyName: toProp.name, + movedAt: assetLocationHistory.movedAt, + movedByName: users.displayName, + reason: assetLocationHistory.reason + }) + .from(assetLocationHistory) + .leftJoin(fromProp, eq(fromProp.id, assetLocationHistory.fromPropertyId)) + .leftJoin(toProp, eq(toProp.id, assetLocationHistory.toPropertyId)) + .leftJoin(users, eq(users.id, assetLocationHistory.movedBy)) + .where(eq(assetLocationHistory.assetId, params.id)) + .orderBy(desc(assetLocationHistory.movedAt)); + return { history: rows }; +}; diff --git a/src/routes/(app)/assets/[id]/history/+page.svelte b/src/routes/(app)/assets/[id]/history/+page.svelte new file mode 100644 index 0000000..8dd7537 --- /dev/null +++ b/src/routes/(app)/assets/[id]/history/+page.svelte @@ -0,0 +1,34 @@ + + +
+ {#if data.history.length === 0} +
+ No movements recorded yet. +
+ {:else} +
    + {#each data.history as h} +
  1. + +
    + + {h.fromKind ? h.fromPropertyName ?? '(unknown)' : '— created —'} + + + {h.toPropertyName ?? '(unknown)'} +
    +
    + {new Date(h.movedAt).toLocaleString()} + {#if h.movedByName}· by {h.movedByName}{/if} +
    + {#if h.reason} +
    {h.reason}
    + {/if} +
  2. + {/each} +
+ {/if} +
diff --git a/src/routes/(app)/assets/[id]/label/+page.server.ts b/src/routes/(app)/assets/[id]/label/+page.server.ts new file mode 100644 index 0000000..4a687ce --- /dev/null +++ b/src/routes/(app)/assets/[id]/label/+page.server.ts @@ -0,0 +1,8 @@ +import { env } from '$lib/server/env'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async () => { + // Absolute URL is what scanners land on. The layout already loaded the asset, + // so we only need to hand down the base URL (not available in the client bundle). + return { publicBaseUrl: env.PUBLIC_BASE_URL.replace(/\/$/, '') }; +}; diff --git a/src/routes/(app)/assets/[id]/label/+page.svelte b/src/routes/(app)/assets/[id]/label/+page.svelte new file mode 100644 index 0000000..9946cad --- /dev/null +++ b/src/routes/(app)/assets/[id]/label/+page.svelte @@ -0,0 +1,75 @@ + + +
+
+ ← back to asset + +
+ + +
+
+
+ {data.assetType.name} +
+ {#if data.asset.tag} +
{data.asset.tag}
+ {/if} +
+ +
{data.asset.name}
+ + {#if data.asset.manufacturer || data.asset.model} +
+ {[data.asset.manufacturer, data.asset.model].filter(Boolean).join(' · ')} +
+ {/if} + {#if data.asset.serialNumber} +
s/n {data.asset.serialNumber}
+ {/if} + {#if data.currentLocationName} +
@ {data.currentLocationName}
+ {/if} + +
+ QR code for {data.asset.name} +
+ +
{scanUrl}
+
+
+ + diff --git a/src/routes/(app)/assets/[id]/logs/+page.server.ts b/src/routes/(app)/assets/[id]/logs/+page.server.ts new file mode 100644 index 0000000..3176c81 --- /dev/null +++ b/src/routes/(app)/assets/[id]/logs/+page.server.ts @@ -0,0 +1,39 @@ +import { error, fail } from '@sveltejs/kit'; +import { desc, eq } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { assetLogs } from '$lib/server/db/schema/assets'; +import { users } from '$lib/server/db/schema/tenancy'; +import { appendAssetLog } from '$lib/server/services/assets'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const rows = await db + .select({ + id: assetLogs.id, + body: assetLogs.body, + createdAt: assetLogs.createdAt, + authorName: users.displayName + }) + .from(assetLogs) + .leftJoin(users, eq(users.id, assetLogs.authorId)) + .where(eq(assetLogs.assetId, params.id)) + .orderBy(desc(assetLogs.createdAt)) + .limit(200); + return { logs: rows }; +}; + +export const actions: Actions = { + add: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const body = String(form.get('body') ?? '').trim(); + if (!body) return fail(400, { error: 'Write something first.' }); + try { + await appendAssetLog(locals.company.id, params.id, locals.user.id, body); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + } +}; diff --git a/src/routes/(app)/assets/[id]/logs/+page.svelte b/src/routes/(app)/assets/[id]/logs/+page.svelte new file mode 100644 index 0000000..a72cb47 --- /dev/null +++ b/src/routes/(app)/assets/[id]/logs/+page.svelte @@ -0,0 +1,58 @@ + + +
+
{ + posting = true; + return ({ update }) => + update().finally(() => { + posting = false; + body = ''; + }); + }} + class="space-y-3 rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800" + > + + {#if form?.error} +

{form.error}

+ {/if} +
+ +
+
+ + {#if data.logs.length === 0} +
+ No log entries yet. +
+ {:else} +
    + {#each data.logs as l} +
  • +
    + {l.authorName ?? '(unknown)'} · {new Date(l.createdAt).toLocaleString()} +
    +
    {l.body}
    +
  • + {/each} +
+ {/if} +
diff --git a/src/routes/(app)/assets/[id]/maintenance/+page.server.ts b/src/routes/(app)/assets/[id]/maintenance/+page.server.ts new file mode 100644 index 0000000..52e143b --- /dev/null +++ b/src/routes/(app)/assets/[id]/maintenance/+page.server.ts @@ -0,0 +1,139 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { listTemplates } from '$lib/server/services/checklists'; +import { + createSchedule, + deleteSchedule, + listEventsForAsset, + listSchedulesForAsset, + listUsageReadingsForAsset, + recordMaintenanceEvent, + recordUsageReading, + setScheduleActive, + type IntervalUnit, + type ScheduleKind +} from '$lib/server/services/maintenance'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const [schedules, events, readings, templates] = await Promise.all([ + listSchedulesForAsset(locals.company.id, params.id), + listEventsForAsset(locals.company.id, params.id), + listUsageReadingsForAsset(locals.company.id, params.id), + listTemplates(locals.company.id) + ]); + return { + schedules, + events, + readings, + templates + }; +}; + +const ScheduleSchema = z.object({ + name: z.string().trim().min(1).max(255), + kind: z.enum(['time', 'usage']), + interval_value: z.coerce.number().int().positive(), + interval_unit: z.enum(['days', 'months', 'years', 'hours', 'cycles', 'km']), + checklist_template_id: z.string().uuid().optional().or(z.literal('')), + start_from: z.string().optional().or(z.literal('')), + start_usage: z.coerce.number().optional().or(z.literal('')), + notes: z.string().trim().max(2000).optional().or(z.literal('')) +}); + +export const actions: Actions = { + createSchedule: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = ScheduleSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + try { + await createSchedule({ + companyId: locals.company.id, + createdBy: locals.user.id, + assetId: params.id, + name: v.name, + kind: v.kind as ScheduleKind, + intervalValue: v.interval_value, + intervalUnit: v.interval_unit as IntervalUnit, + startFrom: v.start_from ? new Date(v.start_from) : null, + startUsage: + typeof v.start_usage === 'number' ? v.start_usage : null, + checklistTemplateId: v.checklist_template_id || null, + notes: v.notes || null + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + completeEvent: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const scheduleId = String(form.get('schedule_id') ?? ''); + const performedAtStr = String(form.get('performed_at') ?? '').trim(); + const usageReadingStr = String(form.get('usage_reading') ?? '').trim(); + const notes = String(form.get('notes') ?? '').trim() || null; + const instantiate = form.get('instantiate_checklist') === 'true'; + + if (!scheduleId) return fail(400, { error: 'Missing schedule_id' }); + + try { + const { eventId, checklistInstanceId } = await recordMaintenanceEvent({ + companyId: locals.company.id, + performedBy: locals.user.id, + scheduleId, + performedAt: performedAtStr ? new Date(performedAtStr) : new Date(), + notes, + usageReading: usageReadingStr ? Number(usageReadingStr) : null, + instantiateChecklist: instantiate + }); + if (checklistInstanceId) { + throw redirect(303, `/assets/${params.id}/maintenance/events/${eventId}`); + } + return { ok: true, eventId }; + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message }); + } + }, + addUsageReading: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const reading = Number(form.get('reading') ?? ''); + const unit = String(form.get('unit') ?? '') as IntervalUnit; + const notes = String(form.get('notes') ?? '').trim() || null; + if (!Number.isFinite(reading)) return fail(400, { error: 'Reading must be a number.' }); + try { + await recordUsageReading({ + companyId: locals.company.id, + recordedBy: locals.user.id, + assetId: params.id, + reading, + unit, + notes + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + toggleScheduleActive: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const scheduleId = String(form.get('schedule_id') ?? ''); + const active = form.get('active') === 'true'; + await setScheduleActive(locals.company.id, scheduleId, active); + return { ok: true }; + }, + deleteSchedule: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const scheduleId = String(form.get('schedule_id') ?? ''); + await deleteSchedule(locals.company.id, scheduleId); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/assets/[id]/maintenance/+page.svelte b/src/routes/(app)/assets/[id]/maintenance/+page.svelte new file mode 100644 index 0000000..363c5f8 --- /dev/null +++ b/src/routes/(app)/assets/[id]/maintenance/+page.svelte @@ -0,0 +1,280 @@ + + +
+ +
+
+

Schedules

+ +
+ + {#if form?.error} +
{form.error}
+ {/if} + + {#if showSchedForm} +
+
+
+ + +
+
+ + +
+
+ +
+ + +
+
+ {#if kind === 'time'} +
+ + +

First service due = anchor + interval. Defaults to today.

+
+ {:else} +
+ + +

Next service due at this + interval.

+
+ {/if} +
+ + +
+
+ + +
+
+
+ +
+
+ {/if} + + {#if data.schedules.length === 0} +
+ No schedules yet. +
+ {:else} +
    + {#each data.schedules as s} + {@const st = statusFor(s.nextDueAt)} +
  • +
    +
    +
    {s.name}
    +
    + every {s.intervalValue} {s.intervalUnit} + · {s.kind} + {#if s.kind === 'time'} + · next: {st.label} + {:else} + · next at usage {s.nextDueUsage ?? '—'} {s.intervalUnit} + {/if} + {#if !s.active} + · inactive + {/if} +
    + {#if s.notes}
    {s.notes}
    {/if} +
    +
    + +
    + + + +
    +
    + + +
    +
    +
    + + {#if openCompleteFor === s.id} +
    + +
    + + {#if s.kind === 'usage'} + + {/if} +
    + + {#if s.checklistTemplateId} + + {/if} +
    + +
    +
    + {/if} +
  • + {/each} +
+ {/if} +
+ + +
+
+

Usage readings

+ +
+ + {#if showUsageForm} +
+ + + +
+ +
+
+ {/if} + + {#if data.readings.length === 0} +

No readings recorded.

+ {:else} +
    + {#each data.readings as r} +
  • +
    + {r.reading} + {r.unit} + {#if r.notes}{r.notes}{/if} +
    + {new Date(r.recordedAt).toLocaleString()} +
  • + {/each} +
+ {/if} +
+ + +
+

Recent events

+ {#if data.events.length === 0} +

No events recorded.

+ {:else} +
    + {#each data.events as e} +
  1. + +
    + + {e.scheduleName ?? '(deleted schedule)'} + + {new Date(e.performedAt).toLocaleString()} + {#if e.checklistInstanceId} + checklist + {/if} +
    + {#if e.notes}
    {e.notes}
    {/if} +
  2. + {/each} +
+ {/if} +
+
diff --git a/src/routes/(app)/assets/[id]/maintenance/events/[eventId]/+page.server.ts b/src/routes/(app)/assets/[id]/maintenance/events/[eventId]/+page.server.ts new file mode 100644 index 0000000..cfd6676 --- /dev/null +++ b/src/routes/(app)/assets/[id]/maintenance/events/[eventId]/+page.server.ts @@ -0,0 +1,68 @@ +import { error, fail } from '@sveltejs/kit'; +import { and, eq } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { assets } from '$lib/server/db/schema/assets'; +import { maintenanceEvents, maintenanceSchedules } from '$lib/server/db/schema/maintenance'; +import { users } from '$lib/server/db/schema/tenancy'; +import { completeInstance, getInstance, setItemDone } from '$lib/server/services/checklists'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const [row] = await db + .select({ + event: maintenanceEvents, + scheduleName: maintenanceSchedules.name, + performedByName: users.displayName + }) + .from(maintenanceEvents) + .leftJoin(maintenanceSchedules, eq(maintenanceSchedules.id, maintenanceEvents.scheduleId)) + .leftJoin(users, eq(users.id, maintenanceEvents.performedBy)) + .innerJoin(assets, eq(assets.id, maintenanceEvents.assetId)) + .where( + and( + eq(maintenanceEvents.id, params.eventId), + eq(maintenanceEvents.assetId, params.id), + eq(assets.companyId, locals.company.id) + ) + ) + .limit(1); + if (!row) throw error(404, 'Event not found'); + + let checklist: Awaited> | null = null; + if (row.event.checklistInstanceId) { + checklist = await getInstance(locals.company.id, row.event.checklistInstanceId); + } + + return { + event: row.event, + scheduleName: row.scheduleName, + performedByName: row.performedByName, + checklist + }; +}; + +export const actions: Actions = { + toggleItem: async ({ request, locals }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const instanceId = String(form.get('instance_id') ?? ''); + const itemId = String(form.get('item_id') ?? ''); + const done = form.get('done') === 'true'; + if (!instanceId || !itemId) return fail(400, { error: 'Missing ids' }); + try { + await setItemDone(locals.company.id, instanceId, itemId, done, locals.user.id); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + completeChecklist: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const instanceId = String(form.get('instance_id') ?? ''); + if (!instanceId) return fail(400, { error: 'Missing instance_id' }); + await completeInstance(locals.company.id, instanceId); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/assets/[id]/maintenance/events/[eventId]/+page.svelte b/src/routes/(app)/assets/[id]/maintenance/events/[eventId]/+page.svelte new file mode 100644 index 0000000..07c3f3d --- /dev/null +++ b/src/routes/(app)/assets/[id]/maintenance/events/[eventId]/+page.svelte @@ -0,0 +1,82 @@ + + +
+
+ ← back to maintenance +

+ {data.scheduleName ?? '(deleted schedule)'} +

+
+ Performed {new Date(data.event.performedAt).toLocaleString()} + {#if data.performedByName}· by {data.performedByName}{/if} + {#if data.event.usageReading}· at {data.event.usageReading}{/if} +
+ {#if data.event.notes}

{data.event.notes}

{/if} +
+ + {#if form?.error} +
{form.error}
+ {/if} + + {#if data.checklist} + {@const inst = data.checklist.instance} + {@const items = data.checklist.items} + {@const remaining = items.filter((i) => i.required && !i.done).length} +
+
+
+

Checklist · {inst.title}

+ {#if inst.completedAt} +

Completed {new Date(inst.completedAt).toLocaleString()}

+ {:else} +

{remaining} required item{remaining === 1 ? '' : 's'} remaining

+ {/if} +
+ {#if !inst.completedAt} +
+ + +
+ {/if} +
+ +
    + {#each items as item} +
  • +
    + + + + +
    +
    +
    {item.text}
    + {#if item.required} + required + {/if} + {#if item.done && item.doneAt} +
    done {new Date(item.doneAt).toLocaleString()}
    + {/if} +
    +
  • + {/each} +
+
+ {:else} +

No checklist was attached to this event.

+ {/if} +
diff --git a/src/routes/(app)/assets/[id]/move/+page.server.ts b/src/routes/(app)/assets/[id]/move/+page.server.ts new file mode 100644 index 0000000..5a3f58e --- /dev/null +++ b/src/routes/(app)/assets/[id]/move/+page.server.ts @@ -0,0 +1,71 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { and, asc, eq, isNull } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { properties } from '$lib/server/db/schema/properties'; +import { projects } from '$lib/server/db/schema/projects'; +import { propertyFloors, propertyRooms } from '$lib/server/db/schema/rooms'; +import { moveAsset } from '$lib/server/services/assets'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals }) => { + if (!locals.company) throw error(401); + const companyId = locals.company.id; + const [props, projs, rooms] = await Promise.all([ + db + .select({ id: properties.id, name: properties.name }) + .from(properties) + .where(and(eq(properties.companyId, companyId), isNull(properties.deletedAt))) + .orderBy(asc(properties.name)), + db + .select({ id: projects.id, name: projects.name }) + .from(projects) + .where(and(eq(projects.companyId, companyId), isNull(projects.deletedAt))) + .orderBy(asc(projects.name)), + db + .select({ + id: propertyRooms.id, + propertyId: propertyRooms.propertyId, + floorLabel: propertyFloors.label, + name: propertyRooms.name + }) + .from(propertyRooms) + .leftJoin(propertyFloors, eq(propertyFloors.id, propertyRooms.floorId)) + .innerJoin(properties, eq(properties.id, propertyRooms.propertyId)) + .where( + and( + eq(properties.companyId, companyId), + isNull(propertyRooms.deletedAt), + isNull(properties.deletedAt) + ) + ) + .orderBy(asc(propertyFloors.order), asc(propertyFloors.label), asc(propertyRooms.name)) + ]); + return { properties: props, projects: projs, rooms }; +}; + +export const actions: Actions = { + default: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const target = String(form.get('target') ?? ''); + const reason = String(form.get('reason') ?? '').trim() || null; + const toRoomId = String(form.get('to_room_id') ?? '').trim() || null; + const [kind, id] = target.split(':', 2); + if ((kind !== 'property' && kind !== 'project') || !id) { + return fail(400, { error: 'Pick a destination.' }); + } + try { + await moveAsset(locals.company.id, params.id, { + toKind: kind, + toId: id, + movedBy: locals.user.id, + reason, + toRoomId: kind === 'property' ? toRoomId : null + }); + throw redirect(303, `/assets/${params.id}/history`); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message }); + } + } +}; diff --git a/src/routes/(app)/assets/[id]/move/+page.svelte b/src/routes/(app)/assets/[id]/move/+page.svelte new file mode 100644 index 0000000..3bbef05 --- /dev/null +++ b/src/routes/(app)/assets/[id]/move/+page.svelte @@ -0,0 +1,84 @@ + + +
{ + moving = true; + return ({ update }) => update().finally(() => (moving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" +> +
+ Currently at {data.currentLocationName ?? '(unknown)'}. +
+ + {#if form?.error} +
{form.error}
+ {/if} + +
+ + +
+ + {#if selectedPropertyId} +
+ + + {#if roomsForProperty.length === 0} +

The target property has no rooms yet.

+ {/if} +
+ {/if} + +
+ + +
+ +
+ +
+
diff --git a/src/routes/(app)/assets/export.csv/+server.ts b/src/routes/(app)/assets/export.csv/+server.ts new file mode 100644 index 0000000..b15747f --- /dev/null +++ b/src/routes/(app)/assets/export.csv/+server.ts @@ -0,0 +1,56 @@ +import { error } from '@sveltejs/kit'; +import { csvResponse, toCsv } from '$lib/server/csv'; +import { listAssets } from '$lib/server/services/assets'; +import type { RequestHandler } from './$types'; + +export const GET: RequestHandler = async ({ locals, url }) => { + if (!locals.company) throw error(400, 'No active company'); + const q = url.searchParams.get('q') ?? undefined; + const typeSlug = url.searchParams.get('type') ?? undefined; + const propertyId = url.searchParams.get('property') ?? undefined; + const projectId = url.searchParams.get('project') ?? undefined; + + const rows = await listAssets({ + companyId: locals.company.id, + q, + typeSlug, + propertyId, + projectId, + limit: 10_000 + }); + + const body = toCsv( + rows.map((r) => ({ + id: r.id, + name: r.name, + type: r.assetTypeName, + type_slug: r.assetTypeSlug, + tag: r.tag, + serial_number: r.serialNumber, + manufacturer: r.manufacturer, + model: r.model, + container_kind: r.currentContainerKind, + property_id: r.currentPropertyId, + updated_at: r.updatedAt + })), + [ + 'id', + 'name', + 'type', + 'type_slug', + 'tag', + 'serial_number', + 'manufacturer', + 'model', + 'container_kind', + 'property_id', + 'updated_at' + ] + ); + + return csvResponse(`assets-${today()}.csv`, body); +}; + +function today(): string { + return new Date().toISOString().slice(0, 10); +} diff --git a/src/routes/(app)/assets/new/+page.server.ts b/src/routes/(app)/assets/new/+page.server.ts new file mode 100644 index 0000000..5f297ad --- /dev/null +++ b/src/routes/(app)/assets/new/+page.server.ts @@ -0,0 +1,121 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { and, asc, eq, isNull, or, sql } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { assetTypes } from '$lib/server/db/schema/assets'; +import { properties } from '$lib/server/db/schema/properties'; +import { propertyFloors, propertyRooms } from '$lib/server/db/schema/rooms'; +import { createAsset, loadTypeWithFields } from '$lib/server/services/assets'; +import { gatherCustomFieldsFromForm } from '$lib/server/custom-fields-form'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, url }) => { + if (!locals.company) throw error(400, 'No active company'); + const companyId = locals.company.id; + const typeId = url.searchParams.get('type_id') ?? ''; + const propertyId = url.searchParams.get('property') ?? ''; + + const types = await db + .select({ + id: assetTypes.id, + name: assetTypes.name, + slug: assetTypes.slug, + icon: assetTypes.icon, + description: assetTypes.description + }) + .from(assetTypes) + .where(or(isNull(assetTypes.companyId), sql`${assetTypes.companyId} = ${companyId}`)!) + .orderBy(asc(assetTypes.name)); + + const props = await db + .select({ id: properties.id, name: properties.name }) + .from(properties) + .where(and(eq(properties.companyId, companyId), isNull(properties.deletedAt))) + .orderBy(asc(properties.name)); + + // All rooms across all properties in this company — the client filters by + // selected property. Lightweight; one round-trip instead of a per-select fetch. + const rooms = await db + .select({ + id: propertyRooms.id, + propertyId: propertyRooms.propertyId, + floorLabel: propertyFloors.label, + name: propertyRooms.name + }) + .from(propertyRooms) + .leftJoin(propertyFloors, eq(propertyFloors.id, propertyRooms.floorId)) + .innerJoin(properties, eq(properties.id, propertyRooms.propertyId)) + .where( + and( + eq(properties.companyId, companyId), + isNull(propertyRooms.deletedAt), + isNull(properties.deletedAt) + ) + ) + .orderBy(asc(propertyFloors.order), asc(propertyFloors.label), asc(propertyRooms.name)); + + let typeWithFields = null; + if (typeId) { + typeWithFields = await loadTypeWithFields(typeId); + if (!typeWithFields) throw error(404, 'Asset type not found'); + } + + return { + types, + properties: props, + rooms, + selectedTypeId: typeId, + selectedPropertyId: propertyId, + typeWithFields + }; +}; + +export const actions: Actions = { + default: async ({ request, locals }) => { + if (!locals.user || !locals.company) throw error(401); + const companyId = locals.company.id; + + const form = await request.formData(); + const assetTypeId = String(form.get('asset_type_id') ?? ''); + const name = String(form.get('name') ?? '').trim(); + const tag = (String(form.get('tag') ?? '').trim() || null) as string | null; + const serialNumber = (String(form.get('serial_number') ?? '').trim() || null) as + | string + | null; + const manufacturer = (String(form.get('manufacturer') ?? '').trim() || null) as string | null; + const model = (String(form.get('model') ?? '').trim() || null) as string | null; + const purchasedAtStr = String(form.get('purchased_at') ?? '').trim(); + const propertyId = String(form.get('property_id') ?? '').trim(); + const roomId = String(form.get('room_id') ?? '').trim() || null; + + if (!assetTypeId) return fail(400, { error: 'Pick an asset type first.' }); + if (!name) return fail(400, { error: 'Name is required.' }); + if (!propertyId) return fail(400, { error: 'Pick a property to place this asset at.' }); + + const tf = await loadTypeWithFields(assetTypeId); + if (!tf) return fail(400, { error: 'Asset type not found.' }); + + const cf = gatherCustomFieldsFromForm(form, tf.fields); + + try { + const { id } = await createAsset({ + companyId, + createdBy: locals.user.id, + assetTypeId, + name, + tag, + serialNumber, + manufacturer, + model, + purchasedAt: purchasedAtStr ? new Date(purchasedAtStr) : null, + containerKind: 'property', + containerId: propertyId, + roomId, + customFields: cf + }); + throw redirect(303, `/assets/${id}`); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message }); + } + } +}; diff --git a/src/routes/(app)/assets/new/+page.svelte b/src/routes/(app)/assets/new/+page.svelte new file mode 100644 index 0000000..7fbea0e --- /dev/null +++ b/src/routes/(app)/assets/new/+page.svelte @@ -0,0 +1,136 @@ + + +
+
+

New asset

+

+ Pick a type to get the right typed fields, then fill in the rest. +

+
+ + {#if !data.typeWithFields} + + + {:else} + +
{ + submitting = true; + return ({ update }) => update().finally(() => (submitting = false)); + }} + class="space-y-6 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" + > +
+
+
Asset type
+
{data.typeWithFields.type.name}
+
+ Change +
+ + + + {#if form?.error} +
{form.error}
+ {/if} + +
+
+ + +
+
+ + +
+
+ + + {#if selectedPropertyId && roomsForProperty.length === 0} +

This property has no rooms yet. Add them from the property's Rooms tab.

+ {/if} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
{data.typeWithFields.type.name} details
+ +
+ +
+ Cancel + +
+
+ {/if} +
diff --git a/src/routes/(app)/checklists/+page.server.ts b/src/routes/(app)/checklists/+page.server.ts new file mode 100644 index 0000000..3b03855 --- /dev/null +++ b/src/routes/(app)/checklists/+page.server.ts @@ -0,0 +1,32 @@ +import { error, fail, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { createTemplate, listTemplates } from '$lib/server/services/checklists'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals }) => { + if (!locals.company) throw error(400, 'No active company'); + const templates = await listTemplates(locals.company.id); + return { templates }; +}; + +const NewSchema = z.object({ + name: z.string().trim().min(1).max(255), + description: z.string().trim().max(10_000).optional().or(z.literal('')) +}); + +export const actions: Actions = { + create: async ({ request, locals }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = NewSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const { id } = await createTemplate({ + companyId: locals.company.id, + createdBy: locals.user.id, + name: parsed.data.name, + description: parsed.data.description || null + }); + throw redirect(303, `/checklists/${id}`); + } +}; diff --git a/src/routes/(app)/checklists/+page.svelte b/src/routes/(app)/checklists/+page.svelte new file mode 100644 index 0000000..1e44f66 --- /dev/null +++ b/src/routes/(app)/checklists/+page.svelte @@ -0,0 +1,81 @@ + + +
+
+
+

Checklist templates

+

+ Reusable checklists you can attach to maintenance, tasks, or anywhere ad-hoc. +

+
+ +
+ + {#if showForm} +
{ + creating = true; + return ({ update }) => update().finally(() => (creating = false)); + }} + class="space-y-3 rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error} +
{form.error}
+ {/if} +
+ + +
+
+ + +
+
+ +
+
+ {/if} + + {#if data.templates.length === 0} +
+ No templates yet. Create one to attach it to a maintenance schedule. +
+ {:else} +
+ + + + + + + + + + {#each data.templates as t} + + + + + + {/each} + +
NameDescriptionItems
+ {t.name} + {t.description ?? '—'}{t.itemCount}
+
+ {/if} +
diff --git a/src/routes/(app)/checklists/[id]/+page.server.ts b/src/routes/(app)/checklists/[id]/+page.server.ts new file mode 100644 index 0000000..4370838 --- /dev/null +++ b/src/routes/(app)/checklists/[id]/+page.server.ts @@ -0,0 +1,50 @@ +import { error, fail, redirect } from '@sveltejs/kit'; +import { + addTemplateItem, + deleteTemplate, + getTemplate, + removeTemplateItem, + updateTemplate +} from '$lib/server/services/checklists'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const tpl = await getTemplate(locals.company.id, params.id); + if (!tpl) throw error(404, 'Template not found'); + return { template: tpl.template, items: tpl.items }; +}; + +export const actions: Actions = { + saveMeta: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const name = String(form.get('name') ?? '').trim(); + const description = String(form.get('description') ?? '').trim() || null; + if (!name) return fail(400, { error: 'Name is required.' }); + await updateTemplate(locals.company.id, params.id, { name, description }); + return { ok: true }; + }, + addItem: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const text = String(form.get('text') ?? '').trim(); + const required = form.get('required') === 'true'; + if (!text) return fail(400, { error: 'Item text is required.' }); + await addTemplateItem(locals.company.id, params.id, text, required); + return { ok: true }; + }, + removeItem: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const itemId = String(form.get('item_id') ?? ''); + if (!itemId) return fail(400, { error: 'Missing item_id' }); + await removeTemplateItem(locals.company.id, params.id, itemId); + return { ok: true }; + }, + delete: async ({ locals, params }) => { + if (!locals.company) throw error(401); + await deleteTemplate(locals.company.id, params.id); + throw redirect(303, '/checklists'); + } +}; diff --git a/src/routes/(app)/checklists/[id]/+page.svelte b/src/routes/(app)/checklists/[id]/+page.svelte new file mode 100644 index 0000000..d6411cf --- /dev/null +++ b/src/routes/(app)/checklists/[id]/+page.svelte @@ -0,0 +1,87 @@ + + +
+ + + {#if form?.error} +
{form.error}
+ {/if} + +
+
+ + +
+
+ + +
+
+ +
+
+ +
+

Items

+ {#if data.items.length === 0} +

No items yet.

+ {:else} +
    + {#each data.items as item, i} +
  • +
    + {i + 1}. + {item.text} + {#if item.required} + required + {/if} +
    +
    + + +
    +
  • + {/each} +
+ {/if} + +
+
+ + +
+ + +
+
+ +
+ + {#if confirmingDelete} +
+

Hard-delete this template. Existing checklist instances created from it will keep their items but lose the template link.

+
+ +
+
+ {/if} +
+
diff --git a/src/routes/(app)/maintenance/+page.server.ts b/src/routes/(app)/maintenance/+page.server.ts new file mode 100644 index 0000000..09d9e88 --- /dev/null +++ b/src/routes/(app)/maintenance/+page.server.ts @@ -0,0 +1,16 @@ +import { error } from '@sveltejs/kit'; +import { listDueAndOverdue } from '$lib/server/services/maintenance'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals }) => { + if (!locals.company) throw error(400, 'No active company'); + const rows = await listDueAndOverdue({ + companyId: locals.company.id, + limit: 200, + upcomingDays: 60 + }); + const now = Date.now(); + const overdue = rows.filter((r) => r.nextDueAt && new Date(r.nextDueAt).getTime() < now); + const upcoming = rows.filter((r) => r.nextDueAt && new Date(r.nextDueAt).getTime() >= now); + return { overdue, upcoming }; +}; diff --git a/src/routes/(app)/maintenance/+page.svelte b/src/routes/(app)/maintenance/+page.svelte new file mode 100644 index 0000000..375ae53 --- /dev/null +++ b/src/routes/(app)/maintenance/+page.svelte @@ -0,0 +1,62 @@ + + +
+
+
+

Maintenance

+

+ Time-based schedules across every asset, sorted by next-due. Usage-based schedules appear on each asset's own maintenance tab. +

+
+ Export CSV +
+ +
+

Overdue ({data.overdue.length})

+ {#if data.overdue.length === 0} +

Nothing overdue. Nice.

+ {:else} +
    + {#each data.overdue as r} + {@const d = dayDelta(r.nextDueAt!)} +
  • +
    + {r.assetName} + — {r.scheduleName} +
    + + {-d} day{-d === 1 ? '' : 's'} overdue + +
  • + {/each} +
+ {/if} +
+ +
+

Upcoming ({data.upcoming.length})

+ {#if data.upcoming.length === 0} +

No schedules due in the next 60 days.

+ {:else} +
    + {#each data.upcoming as r} + {@const d = dayDelta(r.nextDueAt!)} +
  • +
    + {r.assetName} + — {r.scheduleName} +
    + in {d} day{d === 1 ? '' : 's'} ({new Date(r.nextDueAt!).toLocaleDateString()}) +
  • + {/each} +
+ {/if} +
+
diff --git a/src/routes/(app)/maintenance/export.csv/+server.ts b/src/routes/(app)/maintenance/export.csv/+server.ts new file mode 100644 index 0000000..34ca09d --- /dev/null +++ b/src/routes/(app)/maintenance/export.csv/+server.ts @@ -0,0 +1,32 @@ +import { error } from '@sveltejs/kit'; +import { csvResponse, toCsv } from '$lib/server/csv'; +import { listDueAndOverdue } from '$lib/server/services/maintenance'; +import type { RequestHandler } from './$types'; + +export const GET: RequestHandler = async ({ locals, url }) => { + if (!locals.company) throw error(400, 'No active company'); + const upcomingDays = Number.parseInt(url.searchParams.get('days') ?? '60', 10) || 60; + const rows = await listDueAndOverdue({ + companyId: locals.company.id, + limit: 10_000, + upcomingDays + }); + + const body = toCsv( + rows.map((r) => ({ + schedule_id: r.scheduleId, + schedule_name: r.scheduleName, + asset_id: r.assetId, + asset_name: r.assetName, + next_due_at: r.nextDueAt, + interval: `${r.intervalValue} ${r.intervalUnit}` + })), + ['schedule_id', 'schedule_name', 'asset_id', 'asset_name', 'next_due_at', 'interval'] + ); + + return csvResponse(`maintenance-${today()}.csv`, body); +}; + +function today(): string { + return new Date().toISOString().slice(0, 10); +} diff --git a/src/routes/(app)/notifications/+page.server.ts b/src/routes/(app)/notifications/+page.server.ts new file mode 100644 index 0000000..cabe296 --- /dev/null +++ b/src/routes/(app)/notifications/+page.server.ts @@ -0,0 +1,26 @@ +import { fail } from '@sveltejs/kit'; +import { requireCompany } from '$lib/server/auth/guards'; +import { listForUser, markAllRead, markRead } from '$lib/server/services/notifications'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals }) => { + const { user, company } = requireCompany(locals); + const items = await listForUser(user.id, company.id, 200); + return { notifications: items }; +}; + +export const actions: Actions = { + read: async ({ request, locals }) => { + const { user } = requireCompany(locals); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + await markRead(user.id, [id]); + return { ok: true }; + }, + readAll: async ({ locals }) => { + const { user, company } = requireCompany(locals); + await markAllRead(user.id, company.id); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/notifications/+page.svelte b/src/routes/(app)/notifications/+page.svelte new file mode 100644 index 0000000..0e23db6 --- /dev/null +++ b/src/routes/(app)/notifications/+page.svelte @@ -0,0 +1,66 @@ + + +
+
+
+

Notifications

+

+ {unread} unread · {data.notifications.length} total. + Channel settings +

+
+ {#if unread > 0} +
+ +
+ {/if} +
+ + {#if data.notifications.length === 0} +
+ Nothing here yet — new in-app notifications will show up as soon as you're assigned a task or a decision is logged. +
+ {:else} +
    + {#each data.notifications as n} +
  • +
    + {#if n.readAt === null} + + {:else} + + {/if} +
    +
    +
    + + {NOTIFICATION_KIND_LABEL[n.kind as NotificationKind] ?? n.kind} + + {new Date(n.createdAt).toLocaleString()} +
    +
    {n.title}
    +
    {n.body}
    + {#if n.link} + Open → + {/if} +
    + {#if n.readAt === null} +
    + + +
    + {/if} +
  • + {/each} +
+ {/if} +
diff --git a/src/routes/(app)/projects/+page.server.ts b/src/routes/(app)/projects/+page.server.ts new file mode 100644 index 0000000..2b7df88 --- /dev/null +++ b/src/routes/(app)/projects/+page.server.ts @@ -0,0 +1,9 @@ +import { error } from '@sveltejs/kit'; +import { listProjects } from '$lib/server/services/projects'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals }) => { + if (!locals.company) throw error(400, 'No active company'); + const rows = await listProjects(locals.company.id); + return { projects: rows }; +}; diff --git a/src/routes/(app)/projects/+page.svelte b/src/routes/(app)/projects/+page.svelte new file mode 100644 index 0000000..07e6908 --- /dev/null +++ b/src/routes/(app)/projects/+page.svelte @@ -0,0 +1,55 @@ + + +
+
+
+

Projects

+

+ Construction sites, rollouts, retrofits — anything with work packages, tasks, and decisions. +

+
+ + + New project + +
+ + {#if data.projects.length === 0} +
+

No projects yet.

+

Create one to start tracking work packages, tasks, and decisions.

+ Create a project → +
+ {:else} +
+ + + + + + + + + + + {#each data.projects as p} + + + + + + + {/each} + +
NameCodeStatusUpdated
+ {p.name} + {#if p.description}
{p.description}
{/if} +
{p.code ?? '—'} + {p.status} + {new Date(p.updatedAt).toLocaleDateString()}
+
+ {/if} +
diff --git a/src/routes/(app)/projects/[id]/+layout.server.ts b/src/routes/(app)/projects/[id]/+layout.server.ts new file mode 100644 index 0000000..0a50f5a --- /dev/null +++ b/src/routes/(app)/projects/[id]/+layout.server.ts @@ -0,0 +1,10 @@ +import { error } from '@sveltejs/kit'; +import { getProject } from '$lib/server/services/projects'; +import type { LayoutServerLoad } from './$types'; + +export const load: LayoutServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const project = await getProject(locals.company.id, params.id); + if (!project) throw error(404, 'Project not found'); + return { project }; +}; diff --git a/src/routes/(app)/projects/[id]/+layout.svelte b/src/routes/(app)/projects/[id]/+layout.svelte new file mode 100644 index 0000000..64b2265 --- /dev/null +++ b/src/routes/(app)/projects/[id]/+layout.svelte @@ -0,0 +1,36 @@ + + +
+
+
+
+ Project{#if data.project.code} · {data.project.code}{/if} +
+

{data.project.name}

+
+ {data.project.status} + {#if data.project.startDate}start {new Date(data.project.startDate).toLocaleDateString()}{/if} + {#if data.project.endDate}· end {new Date(data.project.endDate).toLocaleDateString()}{/if} +
+
+
+ + + + {@render children()} +
diff --git a/src/routes/(app)/projects/[id]/+page.server.ts b/src/routes/(app)/projects/[id]/+page.server.ts new file mode 100644 index 0000000..c90ff29 --- /dev/null +++ b/src/routes/(app)/projects/[id]/+page.server.ts @@ -0,0 +1,40 @@ +import { error, fail, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { softDeleteProject, updateProject } from '$lib/server/services/projects'; +import type { Actions } from './$types'; + +const Schema = z.object({ + name: z.string().trim().min(1).max(255), + code: z.string().trim().max(64).optional().or(z.literal('')), + description: z.string().trim().max(10_000).optional().or(z.literal('')), + status: z.enum(['active', 'on_hold', 'done', 'cancelled']), + start_date: z.string().optional().or(z.literal('')), + end_date: z.string().optional().or(z.literal('')) +}); + +const e2n = (s: string | undefined) => (!s ? null : s); + +export const actions: Actions = { + save: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + await updateProject(locals.company.id, params.id, { + name: v.name, + code: e2n(v.code), + description: e2n(v.description), + status: v.status, + startDate: v.start_date ? new Date(v.start_date) : null, + endDate: v.end_date ? new Date(v.end_date) : null + }); + return { ok: true }; + }, + delete: async ({ locals, params }) => { + if (!locals.company) throw error(401); + await softDeleteProject(locals.company.id, params.id); + throw redirect(303, '/projects'); + } +}; diff --git a/src/routes/(app)/projects/[id]/+page.svelte b/src/routes/(app)/projects/[id]/+page.svelte new file mode 100644 index 0000000..bf99b95 --- /dev/null +++ b/src/routes/(app)/projects/[id]/+page.svelte @@ -0,0 +1,89 @@ + + +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" +> + {#if form?.error} +
{form.error}
+ {:else if form?.ok} +
Saved.
+ {/if} + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+
+ +{#if confirmingDelete} +
+

Delete this project?

+

Soft-deletes the project. Work packages, tasks, decisions, and documents stay in the DB; assets currently placed here will need to be moved manually.

+
+ + +
+
+{/if} diff --git a/src/routes/(app)/projects/[id]/assets/+page.server.ts b/src/routes/(app)/projects/[id]/assets/+page.server.ts new file mode 100644 index 0000000..47e7cf8 --- /dev/null +++ b/src/routes/(app)/projects/[id]/assets/+page.server.ts @@ -0,0 +1,9 @@ +import { error } from '@sveltejs/kit'; +import { listAssets } from '$lib/server/services/assets'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const rows = await listAssets({ companyId: locals.company.id, projectId: params.id }); + return { assets: rows }; +}; diff --git a/src/routes/(app)/projects/[id]/assets/+page.svelte b/src/routes/(app)/projects/[id]/assets/+page.svelte new file mode 100644 index 0000000..c7a9408 --- /dev/null +++ b/src/routes/(app)/projects/[id]/assets/+page.svelte @@ -0,0 +1,43 @@ + + +
+
+

{data.assets.length} asset{data.assets.length === 1 ? '' : 's'} placed at this project.

+ Move an existing asset here → +
+ + {#if data.assets.length === 0} +
+ No assets at this project yet. Move an asset's location from its detail page (Move tab). +
+ {:else} +
+ + + + + + + + + + + {#each data.assets as a} + + + + + + + {/each} + +
NameTypeTagSerial
+ {a.name} + {a.assetTypeName}{a.tag ?? '—'}{a.serialNumber ?? '—'}
+
+ {/if} +
diff --git a/src/routes/(app)/projects/[id]/decisions/+page.server.ts b/src/routes/(app)/projects/[id]/decisions/+page.server.ts new file mode 100644 index 0000000..da88b56 --- /dev/null +++ b/src/routes/(app)/projects/[id]/decisions/+page.server.ts @@ -0,0 +1,64 @@ +import { error, fail } from '@sveltejs/kit'; +import { z } from 'zod'; +import { createDecision, listDecisionsForScope, softDeleteDecision } from '$lib/server/services/decisions'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const decisions = await listDecisionsForScope(locals.company.id, 'project', params.id); + return { decisions }; +}; + +const Schema = z.object({ + title: z.string().trim().min(1).max(255), + body_md: z.string().trim().min(1).max(50_000), + alternatives_considered: z.string().trim().max(10_000).optional().or(z.literal('')), + cost_impact: z.string().trim().optional().or(z.literal('')), + currency: z.string().trim().length(3).optional().or(z.literal('')), + decided_at: z.string().min(1, 'Decided date is required'), + tags: z.string().trim().max(500).optional().or(z.literal('')) +}); + +export const actions: Actions = { + create: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input', values: raw }); + const v = parsed.data; + const cost = v.cost_impact ? Number(v.cost_impact) : null; + if (v.cost_impact && !Number.isFinite(cost)) { + return fail(400, { error: 'Cost impact must be a number.', values: raw }); + } + const tags = v.tags + ? v.tags.split(',').map((t) => t.trim()).filter(Boolean) + : null; + try { + await createDecision({ + companyId: locals.company.id, + decidedBy: locals.user.id, + scopeType: 'project', + scopeId: params.id, + title: v.title, + bodyMd: v.body_md, + alternativesConsidered: v.alternatives_considered || null, + costImpact: cost, + currency: v.currency || null, + decidedAt: new Date(v.decided_at), + tags + }); + } catch (e) { + return fail(400, { error: (e as Error).message, values: raw }); + } + return { ok: true }; + }, + delete: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + await softDeleteDecision(locals.company.id, id); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/projects/[id]/decisions/+page.svelte b/src/routes/(app)/projects/[id]/decisions/+page.svelte new file mode 100644 index 0000000..ee09d46 --- /dev/null +++ b/src/routes/(app)/projects/[id]/decisions/+page.svelte @@ -0,0 +1,128 @@ + + +
+
+

{data.decisions.length} decision{data.decisions.length === 1 ? '' : 's'} logged for this project.

+
+ {#if data.decisions.length > 0} + Export CSV + {/if} + +
+
+ + {#if creating} +
{ + saving = true; + return ({ update, result }) => + update().finally(() => { + saving = false; + if (result.type === 'success') creating = false; + }); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error}
{form.error}
{/if} +
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ {/if} + + {#if data.decisions.length === 0} +
+ No decisions logged yet. +
+ {:else} +
    + {#each data.decisions as d} +
  • +
    +
    +
    + {new Date(d.decidedAt).toLocaleDateString()} + {#if d.decidedByName}· by {d.decidedByName}{/if} + {#if d.costImpact !== null}· cost {fmtMoney(d.costImpact, d.currency)}{/if} +
    +

    {d.title}

    +
    {d.bodyMd}
    + {#if d.alternativesConsidered} +
    +
    Alternatives considered
    +
    {d.alternativesConsidered}
    +
    + {/if} + {#if d.tags && d.tags.length > 0} +
    + {#each d.tags as tag} + {tag} + {/each} +
    + {/if} +
    +
    + + +
    +
    +
  • + {/each} +
+ {/if} +
diff --git a/src/routes/(app)/projects/[id]/decisions/export.csv/+server.ts b/src/routes/(app)/projects/[id]/decisions/export.csv/+server.ts new file mode 100644 index 0000000..b2536ad --- /dev/null +++ b/src/routes/(app)/projects/[id]/decisions/export.csv/+server.ts @@ -0,0 +1,40 @@ +import { error } from '@sveltejs/kit'; +import { csvResponse, toCsv } from '$lib/server/csv'; +import { listDecisionsForScope } from '$lib/server/services/decisions'; +import type { RequestHandler } from './$types'; + +export const GET: RequestHandler = async ({ locals, params }) => { + if (!locals.company) throw error(400, 'No active company'); + const rows = await listDecisionsForScope(locals.company.id, 'project', params.id); + + const body = toCsv( + rows.map((r) => ({ + id: r.id, + decided_at: r.decidedAt, + title: r.title, + body_md: r.bodyMd, + alternatives_considered: r.alternativesConsidered, + cost_impact: r.costImpact, + currency: r.currency, + tags: r.tags, + decided_by: r.decidedByName + })), + [ + 'id', + 'decided_at', + 'title', + 'body_md', + 'alternatives_considered', + 'cost_impact', + 'currency', + 'tags', + 'decided_by' + ] + ); + + return csvResponse(`project-${params.id.slice(0, 8)}-decisions-${today()}.csv`, body); +}; + +function today(): string { + return new Date().toISOString().slice(0, 10); +} diff --git a/src/routes/(app)/projects/[id]/documents/+page.server.ts b/src/routes/(app)/projects/[id]/documents/+page.server.ts new file mode 100644 index 0000000..5ec3fa0 --- /dev/null +++ b/src/routes/(app)/projects/[id]/documents/+page.server.ts @@ -0,0 +1,56 @@ +import { error, fail } from '@sveltejs/kit'; +import { + deleteDocument, + listDocumentsForScope, + signedUrlForDocument, + uploadDocument +} from '$lib/server/services/documents'; +import type { Actions, PageServerLoad } from './$types'; + +const MAX_BYTES = 50 * 1024 * 1024; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const docs = await listDocumentsForScope(locals.company.id, 'project', params.id); + const enriched = await Promise.all( + docs.map(async (d) => ({ + ...d, + downloadUrl: await signedUrlForDocument(d, 'attachment'), + previewUrl: await signedUrlForDocument(d, 'inline') + })) + ); + return { documents: enriched }; +}; + +export const actions: Actions = { + upload: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const file = form.get('file'); + if (!(file instanceof File) || file.size === 0) return fail(400, { error: 'Pick a file.' }); + if (file.size > MAX_BYTES) return fail(413, { error: 'File too large (max 50 MB).' }); + const buf = Buffer.from(await file.arrayBuffer()); + try { + await uploadDocument({ + companyId: locals.company.id, + uploadedBy: locals.user.id, + scopeType: 'project', + scopeId: params.id, + filename: file.name || 'upload.bin', + mimeType: file.type || 'application/octet-stream', + body: buf + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + delete: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + await deleteDocument(locals.company.id, id); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/projects/[id]/documents/+page.svelte b/src/routes/(app)/projects/[id]/documents/+page.svelte new file mode 100644 index 0000000..4ad370b --- /dev/null +++ b/src/routes/(app)/projects/[id]/documents/+page.svelte @@ -0,0 +1,59 @@ + + +
+
{ + uploading = true; + return ({ update }) => update().finally(() => (uploading = false)); + }} + class="rounded-lg border border-dashed border-gray-300 bg-white p-4 dark:border-gray-700 dark:bg-gray-800"> +
+ + +
+ {#if form?.error}

{form.error}

{/if} + {#if form?.ok}

Done.

{/if} +
+ + {#if data.documents.length === 0} +
+ No documents attached to this project. +
+ {:else} +
    + {#each data.documents as d} +
  • +
    + {d.filename} +
    + {d.mimeType} · {fmtSize(d.sizeBytes)} · {new Date(d.uploadedAt).toLocaleString()} +
    +
    +
    + Download +
    + + +
    +
    +
  • + {/each} +
+ {/if} +
diff --git a/src/routes/(app)/projects/[id]/wiki/+page.server.ts b/src/routes/(app)/projects/[id]/wiki/+page.server.ts new file mode 100644 index 0000000..5e28ff8 --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/+page.server.ts @@ -0,0 +1,18 @@ +import { error } from '@sveltejs/kit'; +import { listPagesForScope, searchPages } from '$lib/server/services/wiki'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params, url }) => { + if (!locals.company) throw error(401); + const q = url.searchParams.get('q')?.trim() ?? ''; + const pages = q + ? await searchPages({ + companyId: locals.company.id, + scopeType: 'project', + scopeId: params.id, + q, + limit: 100 + }) + : await listPagesForScope(locals.company.id, 'project', params.id); + return { pages, q }; +}; diff --git a/src/routes/(app)/projects/[id]/wiki/+page.svelte b/src/routes/(app)/projects/[id]/wiki/+page.svelte new file mode 100644 index 0000000..a7f5411 --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/+page.svelte @@ -0,0 +1,41 @@ + + +
+
+

+ Wiki pages scoped to this project. Global pages are at + /wiki. +

+ + New page +
+ +
+ + + {#if data.q}clear{/if} +
+ + {#if data.pages.length === 0} +
+ {#if data.q}No pages match "{data.q}".{:else}No project wiki pages yet.{/if} +
+ {:else} + + {/if} +
diff --git a/src/routes/(app)/projects/[id]/wiki/[slug]/+page.server.ts b/src/routes/(app)/projects/[id]/wiki/[slug]/+page.server.ts new file mode 100644 index 0000000..fd80b2c --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/[slug]/+page.server.ts @@ -0,0 +1,26 @@ +import { error, fail, redirect } from '@sveltejs/kit'; +import { getPageWithCurrentRevision, softDeletePage } from '$lib/server/services/wiki'; +import { renderMarkdown } from '$lib/server/markdown'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'project', params.id, params.slug); + if (!found) throw error(404, 'Page not found'); + return { + wikiPage: found.page, + revision: found.revision, + editedByName: found.editedByName, + bodyHtml: renderMarkdown(found.revision.bodyMd) + }; +}; + +export const actions: Actions = { + delete: async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'project', params.id, params.slug); + if (!found) return fail(404, { error: 'Not found' }); + await softDeletePage(locals.company.id, found.page.id); + throw redirect(303, `/projects/${params.id}/wiki`); + } +}; diff --git a/src/routes/(app)/projects/[id]/wiki/[slug]/+page.svelte b/src/routes/(app)/projects/[id]/wiki/[slug]/+page.svelte new file mode 100644 index 0000000..62bcb42 --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/[slug]/+page.svelte @@ -0,0 +1,37 @@ + + +
+
+
+ ← all pages +

{data.revision.title}

+
+ rev {data.revision.revision} + · edited {new Date(data.revision.editedAt).toLocaleString()} + {#if data.editedByName}· by {data.editedByName}{/if} + history +
+
+
+ Edit + +
+
+ + {#if confirmingDelete} +
+ Soft-delete this page? +
+ {/if} + +
+ {@html data.bodyHtml} +
+
diff --git a/src/routes/(app)/projects/[id]/wiki/[slug]/edit/+page.server.ts b/src/routes/(app)/projects/[id]/wiki/[slug]/edit/+page.server.ts new file mode 100644 index 0000000..62c6d28 --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/[slug]/edit/+page.server.ts @@ -0,0 +1,44 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { getPageWithCurrentRevision, upsertPage } from '$lib/server/services/wiki'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'project', params.id, params.slug); + if (!found) throw error(404, 'Page not found'); + return { wikiPage: found.page, revision: found.revision }; +}; + +const Schema = z.object({ + title: z.string().trim().min(1).max(255), + body_md: z.string().min(1).max(200_000), + comment: z.string().trim().max(500).optional().or(z.literal('')) +}); + +export const actions: Actions = { + default: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + try { + await upsertPage({ + companyId: locals.company.id, + editedBy: locals.user.id, + scopeType: 'project', + scopeId: params.id, + slug: params.slug, + title: v.title, + bodyMd: v.body_md, + comment: v.comment || null + }); + throw redirect(303, `/projects/${params.id}/wiki/${params.slug}`); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message }); + } + } +}; diff --git a/src/routes/(app)/projects/[id]/wiki/[slug]/edit/+page.svelte b/src/routes/(app)/projects/[id]/wiki/[slug]/edit/+page.svelte new file mode 100644 index 0000000..852a092 --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/[slug]/edit/+page.svelte @@ -0,0 +1,44 @@ + + +
+
+ ← back to page +

Edit · {data.revision.title}

+

Saving creates a new revision (currently rev {data.revision.revision}).

+
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error}
{form.error}
{/if} +
+ + +
+
+ + +
+
+ + +
+
+ Cancel + +
+
+
diff --git a/src/routes/(app)/projects/[id]/wiki/[slug]/history/+page.server.ts b/src/routes/(app)/projects/[id]/wiki/[slug]/history/+page.server.ts new file mode 100644 index 0000000..f80ddcb --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/[slug]/history/+page.server.ts @@ -0,0 +1,11 @@ +import { error } from '@sveltejs/kit'; +import { getPageWithCurrentRevision, listRevisions } from '$lib/server/services/wiki'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'project', params.id, params.slug); + if (!found) throw error(404, 'Page not found'); + const revs = await listRevisions(locals.company.id, found.page.id); + return { wikiPage: found.page, current: found.revision, revisions: revs }; +}; diff --git a/src/routes/(app)/projects/[id]/wiki/[slug]/history/+page.svelte b/src/routes/(app)/projects/[id]/wiki/[slug]/history/+page.svelte new file mode 100644 index 0000000..2e24798 --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/[slug]/history/+page.svelte @@ -0,0 +1,30 @@ + + +
+
+ ← back to page +

History · {data.current.title}

+

{data.revisions.length} revision{data.revisions.length === 1 ? '' : 's'}.

+
+ + +
diff --git a/src/routes/(app)/projects/[id]/wiki/[slug]/revisions/[rev]/+page.server.ts b/src/routes/(app)/projects/[id]/wiki/[slug]/revisions/[rev]/+page.server.ts new file mode 100644 index 0000000..172b62a --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/[slug]/revisions/[rev]/+page.server.ts @@ -0,0 +1,21 @@ +import { error } from '@sveltejs/kit'; +import { getPageWithCurrentRevision, getRevision } from '$lib/server/services/wiki'; +import { renderMarkdown } from '$lib/server/markdown'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'project', params.id, params.slug); + if (!found) throw error(404, 'Page not found'); + const revNum = Number.parseInt(params.rev, 10); + if (!Number.isFinite(revNum)) throw error(400, 'Invalid revision'); + const rev = await getRevision(locals.company.id, found.page.id, revNum); + if (!rev) throw error(404, 'Revision not found'); + return { + wikiPage: found.page, + current: found.revision, + revision: rev.revision, + editedByName: rev.editedByName, + bodyHtml: renderMarkdown(rev.revision.bodyMd) + }; +}; diff --git a/src/routes/(app)/projects/[id]/wiki/[slug]/revisions/[rev]/+page.svelte b/src/routes/(app)/projects/[id]/wiki/[slug]/revisions/[rev]/+page.svelte new file mode 100644 index 0000000..b5b3537 --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/[slug]/revisions/[rev]/+page.svelte @@ -0,0 +1,27 @@ + + +
+
+ ← history +

{data.revision.title}

+
+ + rev {data.revision.revision}{isCurrent ? ' · current' : ''} + + {new Date(data.revision.editedAt).toLocaleString()} + {#if data.editedByName}· by {data.editedByName}{/if} + {#if !isCurrent} + view current → + {/if} +
+ {#if data.revision.comment}

{data.revision.comment}

{/if} +
+ +
+ {@html data.bodyHtml} +
+
diff --git a/src/routes/(app)/projects/[id]/wiki/new/+page.server.ts b/src/routes/(app)/projects/[id]/wiki/new/+page.server.ts new file mode 100644 index 0000000..dc4acf2 --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/new/+page.server.ts @@ -0,0 +1,39 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { slugify, upsertPage } from '$lib/server/services/wiki'; +import type { Actions } from './$types'; + +const Schema = z.object({ + title: z.string().trim().min(1).max(255), + slug: z.string().trim().max(128).optional().or(z.literal('')), + body_md: z.string().min(1).max(200_000), + comment: z.string().trim().max(500).optional().or(z.literal('')) +}); + +export const actions: Actions = { + default: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input', values: raw }); + const v = parsed.data; + const slug = slugify(v.slug || v.title); + try { + await upsertPage({ + companyId: locals.company.id, + editedBy: locals.user.id, + scopeType: 'project', + scopeId: params.id, + slug, + title: v.title, + bodyMd: v.body_md, + comment: v.comment || null + }); + throw redirect(303, `/projects/${params.id}/wiki/${slug}`); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message, values: raw }); + } + } +}; diff --git a/src/routes/(app)/projects/[id]/wiki/new/+page.svelte b/src/routes/(app)/projects/[id]/wiki/new/+page.svelte new file mode 100644 index 0000000..5969cfb --- /dev/null +++ b/src/routes/(app)/projects/[id]/wiki/new/+page.svelte @@ -0,0 +1,52 @@ + + +
+
+ ← all pages +

New page

+
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error}
{form.error}
{/if} + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ Cancel + +
+
+
diff --git a/src/routes/(app)/projects/[id]/work/+page.server.ts b/src/routes/(app)/projects/[id]/work/+page.server.ts new file mode 100644 index 0000000..3582660 --- /dev/null +++ b/src/routes/(app)/projects/[id]/work/+page.server.ts @@ -0,0 +1,39 @@ +import { error, fail } from '@sveltejs/kit'; +import { z } from 'zod'; +import { + createWorkPackage, + listWorkPackagesForProject +} from '$lib/server/services/work-packages'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const wps = await listWorkPackagesForProject(locals.company.id, params.id); + return { workPackages: wps }; +}; + +const Schema = z.object({ + name: z.string().trim().min(1).max(255), + description: z.string().trim().max(10_000).optional().or(z.literal('')) +}); + +export const actions: Actions = { + create: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + try { + await createWorkPackage({ + companyId: locals.company.id, + projectId: params.id, + name: parsed.data.name, + description: parsed.data.description || null + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + } +}; diff --git a/src/routes/(app)/projects/[id]/work/+page.svelte b/src/routes/(app)/projects/[id]/work/+page.svelte new file mode 100644 index 0000000..66761b8 --- /dev/null +++ b/src/routes/(app)/projects/[id]/work/+page.svelte @@ -0,0 +1,65 @@ + + +
+
+

{data.workPackages.length} work package{data.workPackages.length === 1 ? '' : 's'}.

+ +
+ + {#if showForm} +
{ + creating = true; + return ({ update }) => update().finally(() => (creating = false)); + }} + class="space-y-3 rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error}
{form.error}
{/if} +
+ + +
+
+ + +
+
+ +
+
+ {/if} + + {#if data.workPackages.length === 0} +
+ No work packages yet. +
+ {:else} +
    + {#each data.workPackages as wp} +
  • +
    +
    + {wp.name} + {#if wp.description}
    {wp.description}
    {/if} +
    +
    + {wp.openTasks}/{wp.totalTasks} open +
    +
    +
  • + {/each} +
+ {/if} +
diff --git a/src/routes/(app)/projects/[id]/work/[wpId]/+page.server.ts b/src/routes/(app)/projects/[id]/work/[wpId]/+page.server.ts new file mode 100644 index 0000000..6ac86b9 --- /dev/null +++ b/src/routes/(app)/projects/[id]/work/[wpId]/+page.server.ts @@ -0,0 +1,63 @@ +import { error, fail } from '@sveltejs/kit'; +import { z } from 'zod'; +import { getWorkPackage, softDeleteWorkPackage, updateWorkPackage } from '$lib/server/services/work-packages'; +import { createTask, listTasksForWorkPackage } from '$lib/server/services/tasks'; +import { redirect } from '@sveltejs/kit'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const wp = await getWorkPackage(locals.company.id, params.wpId); + if (!wp) throw error(404, 'Work package not found'); + const tasks = await listTasksForWorkPackage(locals.company.id, params.wpId); + return { workPackage: wp, tasks }; +}; + +const TaskSchema = z.object({ + title: z.string().trim().min(1).max(255), + due_at: z.string().optional().or(z.literal('')) +}); + +const WpPatchSchema = z.object({ + name: z.string().trim().min(1).max(255), + description: z.string().trim().max(10_000).optional().or(z.literal('')) +}); + +export const actions: Actions = { + createTask: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = TaskSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + try { + await createTask({ + companyId: locals.company.id, + createdBy: locals.user.id, + workPackageId: params.wpId, + title: parsed.data.title, + dueAt: parsed.data.due_at ? new Date(parsed.data.due_at) : null + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + saveWp: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = WpPatchSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + await updateWorkPackage(locals.company.id, params.wpId, { + name: parsed.data.name, + description: parsed.data.description || null + }); + return { ok: true }; + }, + deleteWp: async ({ locals, params }) => { + if (!locals.company) throw error(401); + await softDeleteWorkPackage(locals.company.id, params.wpId); + throw redirect(303, `/projects/${params.id}/work`); + } +}; diff --git a/src/routes/(app)/projects/[id]/work/[wpId]/+page.svelte b/src/routes/(app)/projects/[id]/work/[wpId]/+page.svelte new file mode 100644 index 0000000..6769585 --- /dev/null +++ b/src/routes/(app)/projects/[id]/work/[wpId]/+page.svelte @@ -0,0 +1,116 @@ + + +
+ + + {#if form?.error} +
{form.error}
+ {/if} + +
+ {#if editing} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') editing = false; + }}> +
+ + +
+
+ + +
+
+ + +
+
+ {:else} +
+
+

{wp.name}

+ {#if wp.description}

{wp.description}

{/if} +
+
+ + +
+
+ {/if} +
+ + {#if confirmingDelete} +
+ Soft-delete this work package and its tasks? +
+ {/if} + +
+
+

Tasks

+ +
+ + {#if creating} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') creating = false; + }} + class="grid gap-3 rounded-lg border border-gray-200 bg-white p-3 sm:grid-cols-3 dark:border-gray-700 dark:bg-gray-800"> +
+ + +
+
+ + +
+
+ +
+
+ {/if} + + {#if data.tasks.length === 0} +
+ No tasks yet. +
+ {:else} +
    + {#each data.tasks as t} +
  • + {t.title} + {t.status} + {#if t.dueAt}{new Date(t.dueAt).toLocaleDateString()}{/if} +
  • + {/each} +
+ {/if} +
+
diff --git a/src/routes/(app)/projects/[id]/work/[wpId]/[taskId]/+page.server.ts b/src/routes/(app)/projects/[id]/work/[wpId]/[taskId]/+page.server.ts new file mode 100644 index 0000000..97face7 --- /dev/null +++ b/src/routes/(app)/projects/[id]/work/[wpId]/[taskId]/+page.server.ts @@ -0,0 +1,72 @@ +import { error, fail, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { + addSubtask, + getTaskWithSubtasks, + removeSubtask, + softDeleteTask, + toggleSubtask, + updateTask, + type TaskStatus +} from '$lib/server/services/tasks'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const t = await getTaskWithSubtasks(locals.company.id, params.taskId); + if (!t) throw error(404, 'Task not found'); + return { task: t.task, subtasks: t.subtasks, workPackageName: t.workPackageName }; +}; + +const TaskPatchSchema = z.object({ + title: z.string().trim().min(1).max(255), + description: z.string().trim().max(50_000).optional().or(z.literal('')), + status: z.enum(['todo', 'doing', 'done', 'blocked']), + due_at: z.string().optional().or(z.literal('')) +}); + +export const actions: Actions = { + save: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = TaskPatchSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + await updateTask(locals.company.id, params.taskId, { + title: v.title, + description: v.description || null, + status: v.status as TaskStatus, + dueAt: v.due_at ? new Date(v.due_at) : null + }); + return { ok: true }; + }, + delete: async ({ locals, params }) => { + if (!locals.company) throw error(401); + await softDeleteTask(locals.company.id, params.taskId); + throw redirect(303, `/projects/${params.id}/work/${params.wpId}`); + }, + addSubtask: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const name = String(form.get('name') ?? '').trim(); + if (!name) return fail(400, { error: 'Name required' }); + await addSubtask(locals.company.id, params.taskId, name); + return { ok: true }; + }, + toggleSubtask: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const subtaskId = String(form.get('subtask_id') ?? ''); + const done = form.get('done') === 'true'; + await toggleSubtask(locals.company.id, params.taskId, subtaskId, done); + return { ok: true }; + }, + removeSubtask: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const subtaskId = String(form.get('subtask_id') ?? ''); + await removeSubtask(locals.company.id, params.taskId, subtaskId); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/projects/[id]/work/[wpId]/[taskId]/+page.svelte b/src/routes/(app)/projects/[id]/work/[wpId]/[taskId]/+page.svelte new file mode 100644 index 0000000..82c88c6 --- /dev/null +++ b/src/routes/(app)/projects/[id]/work/[wpId]/[taskId]/+page.svelte @@ -0,0 +1,112 @@ + + +
+ + + {#if form?.error}
{form.error}
{:else if form?.ok}
Saved.
{/if} + +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> +
+ + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + {#if confirmingDelete} +
+ Soft-delete this task and its subtasks? +
+ {/if} + +
+

+ Subtasks ({data.subtasks.length - requiredOpen}/{data.subtasks.length}) +

+ + {#if data.subtasks.length > 0} +
    + {#each data.subtasks as s} +
  • +
    + + + +
    +
    {s.name}
    +
    + + +
    +
  • + {/each} +
+ {/if} + +
async ({ update, result }) => { + await update(); + if (result.type === 'success') newSubtask = ''; + }} + class="flex gap-2 rounded-lg border border-dashed border-gray-300 bg-white p-3 dark:border-gray-700 dark:bg-gray-800"> + + +
+
+
diff --git a/src/routes/(app)/projects/new/+page.server.ts b/src/routes/(app)/projects/new/+page.server.ts new file mode 100644 index 0000000..d94a128 --- /dev/null +++ b/src/routes/(app)/projects/new/+page.server.ts @@ -0,0 +1,48 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { createProject } from '$lib/server/services/projects'; +import type { Actions } from './$types'; + +const Schema = z.object({ + name: z.string().trim().min(1).max(255), + code: z.string().trim().max(64).optional().or(z.literal('')), + description: z.string().trim().max(10_000).optional().or(z.literal('')), + status: z.enum(['active', 'on_hold', 'done', 'cancelled']).default('active'), + start_date: z.string().optional().or(z.literal('')), + end_date: z.string().optional().or(z.literal('')) +}); + +const e2n = (s: string | undefined) => (!s ? null : s); + +export const actions: Actions = { + default: async ({ request, locals }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) { + return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input', values: raw }); + } + const v = parsed.data; + try { + const { id } = await createProject({ + companyId: locals.company.id, + createdBy: locals.user.id, + name: v.name, + code: e2n(v.code), + description: e2n(v.description), + status: v.status, + startDate: v.start_date ? new Date(v.start_date) : null, + endDate: v.end_date ? new Date(v.end_date) : null + }); + throw redirect(303, `/projects/${id}`); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + const msg = (e as Error).message ?? 'create failed'; + if (msg.includes('projects_company_code_uq')) { + return fail(400, { error: 'A project with that code already exists.', values: raw }); + } + return fail(400, { error: msg, values: raw }); + } + } +}; diff --git a/src/routes/(app)/projects/new/+page.svelte b/src/routes/(app)/projects/new/+page.svelte new file mode 100644 index 0000000..545f5e5 --- /dev/null +++ b/src/routes/(app)/projects/new/+page.svelte @@ -0,0 +1,70 @@ + + +
+
+

New project

+

+ A container for work packages, tasks, decisions, and the assets dedicated to that project (e.g. a construction site). +

+
+ +
{ + submitting = true; + return ({ update }) => update().finally(() => (submitting = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error} +
{form.error}
+ {/if} +
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ Cancel + +
+
+
diff --git a/src/routes/(app)/properties/+page.server.ts b/src/routes/(app)/properties/+page.server.ts new file mode 100644 index 0000000..14e41cb --- /dev/null +++ b/src/routes/(app)/properties/+page.server.ts @@ -0,0 +1,9 @@ +import { error } from '@sveltejs/kit'; +import { listProperties } from '$lib/server/services/properties'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals }) => { + if (!locals.company) throw error(400, 'No active company. Pick one from the sidebar.'); + const rows = await listProperties(locals.company.id); + return { properties: rows }; +}; diff --git a/src/routes/(app)/properties/+page.svelte b/src/routes/(app)/properties/+page.svelte new file mode 100644 index 0000000..9e4c1ba --- /dev/null +++ b/src/routes/(app)/properties/+page.svelte @@ -0,0 +1,61 @@ + + +
+
+
+

Properties

+

+ Sites, warehouses, and other places that hold assets. +

+
+ + + + + New property + +
+ + {#if data.properties.length === 0} +
+

No properties yet.

+

Create your first one to start placing assets.

+ Create a property → +
+ {:else} +
+ + + + + + + + + + + {#each data.properties as p} + + + + + + + {/each} + +
NameKindAddressUpdated
+ {p.name} + {p.kind ?? '—'} + {[p.addressLine1, p.city, p.region].filter(Boolean).join(', ') || '—'} + + {new Date(p.updatedAt).toLocaleDateString()} +
+
+ {/if} +
diff --git a/src/routes/(app)/properties/[id]/+layout.server.ts b/src/routes/(app)/properties/[id]/+layout.server.ts new file mode 100644 index 0000000..ad5f9bd --- /dev/null +++ b/src/routes/(app)/properties/[id]/+layout.server.ts @@ -0,0 +1,10 @@ +import { error } from '@sveltejs/kit'; +import { getProperty } from '$lib/server/services/properties'; +import type { LayoutServerLoad } from './$types'; + +export const load: LayoutServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(400, 'No active company'); + const property = await getProperty(locals.company.id, params.id); + if (!property) throw error(404, 'Property not found'); + return { property }; +}; diff --git a/src/routes/(app)/properties/[id]/+layout.svelte b/src/routes/(app)/properties/[id]/+layout.svelte new file mode 100644 index 0000000..1b36700 --- /dev/null +++ b/src/routes/(app)/properties/[id]/+layout.svelte @@ -0,0 +1,39 @@ + + +
+
+
+
+ {data.property.kind ?? 'Property'} +
+

+ {data.property.name} +

+ {#if data.property.addressLine1 || data.property.city} +

+ {[data.property.addressLine1, data.property.city, data.property.region, data.property.countryCode] + .filter(Boolean) + .join(', ')} +

+ {/if} +
+
+ + + + {@render children()} +
diff --git a/src/routes/(app)/properties/[id]/+page.server.ts b/src/routes/(app)/properties/[id]/+page.server.ts new file mode 100644 index 0000000..cd39caa --- /dev/null +++ b/src/routes/(app)/properties/[id]/+page.server.ts @@ -0,0 +1,49 @@ +import { error, fail } from '@sveltejs/kit'; +import { z } from 'zod'; +import { updateProperty, softDeleteProperty } from '$lib/server/services/properties'; +import { redirect } from '@sveltejs/kit'; +import type { Actions } from './$types'; + +const PatchSchema = z.object({ + name: z.string().trim().min(1).max(255), + kind: z.string().trim().max(64).optional().or(z.literal('')), + addressLine1: z.string().trim().max(255).optional().or(z.literal('')), + addressLine2: z.string().trim().max(255).optional().or(z.literal('')), + city: z.string().trim().max(128).optional().or(z.literal('')), + region: z.string().trim().max(128).optional().or(z.literal('')), + postalCode: z.string().trim().max(32).optional().or(z.literal('')), + countryCode: z.string().trim().length(2).optional().or(z.literal('')), + notes: z.string().trim().max(10_000).optional().or(z.literal('')) +}); + +const e2n = (s: string | undefined) => (!s ? null : s); + +export const actions: Actions = { + save: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = PatchSchema.safeParse(raw); + if (!parsed.success) { + return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + } + const v = parsed.data; + await updateProperty(locals.company.id, params.id, { + name: v.name, + kind: e2n(v.kind), + addressLine1: e2n(v.addressLine1), + addressLine2: e2n(v.addressLine2), + city: e2n(v.city), + region: e2n(v.region), + postalCode: e2n(v.postalCode), + countryCode: e2n(v.countryCode), + notes: e2n(v.notes) + }); + return { ok: true }; + }, + delete: async ({ locals, params }) => { + if (!locals.company) throw error(401); + await softDeleteProperty(locals.company.id, params.id); + throw redirect(303, '/properties'); + } +}; diff --git a/src/routes/(app)/properties/[id]/+page.svelte b/src/routes/(app)/properties/[id]/+page.svelte new file mode 100644 index 0000000..80548c0 --- /dev/null +++ b/src/routes/(app)/properties/[id]/+page.svelte @@ -0,0 +1,96 @@ + + +
{ + submitting = true; + return ({ update }) => update().finally(() => (submitting = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" +> + {#if form?.error} +
{form.error}
+ {:else if form?.ok} +
Saved.
+ {/if} + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+
+ +{#if confirmingDelete} +
+

Delete this property?

+

This soft-deletes the property. Assets currently here will need to be moved manually before this is fully cleaned up.

+
+ + +
+
+{/if} diff --git a/src/routes/(app)/properties/[id]/accounts/+page.server.ts b/src/routes/(app)/properties/[id]/accounts/+page.server.ts new file mode 100644 index 0000000..7f4686d --- /dev/null +++ b/src/routes/(app)/properties/[id]/accounts/+page.server.ts @@ -0,0 +1,93 @@ +import { error, fail } from '@sveltejs/kit'; +import { z } from 'zod'; +import { + createAccount, + deleteAccount, + listAccounts, + updateAccount, + type AccountKind +} from '$lib/server/services/accounts'; +import type { Actions, PageServerLoad } from './$types'; + +const KINDS = [ + 'water', + 'electricity', + 'gas', + 'internet', + 'phone', + 'cable', + 'waste', + 'other' +] as const; + +const Schema = z.object({ + kind: z.enum(KINDS), + provider: z.string().trim().max(128).optional().or(z.literal('')), + label: z.string().trim().max(128).optional().or(z.literal('')), + account_number: z.string().trim().max(128).optional().or(z.literal('')), + meter_number: z.string().trim().max(128).optional().or(z.literal('')), + notes: z.string().trim().max(2000).optional().or(z.literal('')) +}); + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const accounts = await listAccounts(locals.company.id, params.id); + return { accounts }; +}; + +export const actions: Actions = { + create: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + try { + await createAccount({ + companyId: locals.company.id, + propertyId: params.id, + kind: v.kind as AccountKind, + provider: v.provider || null, + label: v.label || null, + accountNumber: v.account_number || null, + meterNumber: v.meter_number || null, + notes: v.notes || null + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + update: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + try { + await updateAccount(locals.company.id, id, { + kind: v.kind as AccountKind, + provider: v.provider || null, + label: v.label || null, + accountNumber: v.account_number || null, + meterNumber: v.meter_number || null, + notes: v.notes || null + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + delete: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + await deleteAccount(locals.company.id, id); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/properties/[id]/accounts/+page.svelte b/src/routes/(app)/properties/[id]/accounts/+page.svelte new file mode 100644 index 0000000..7d7731c --- /dev/null +++ b/src/routes/(app)/properties/[id]/accounts/+page.svelte @@ -0,0 +1,181 @@ + + +
+
+

+ {data.accounts.length} account{data.accounts.length === 1 ? '' : 's'} on file. +

+ +
+ + {#if form?.error} +
{form.error}
+ {/if} + + {#if showForm} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') showForm = false; + }} + class="grid gap-3 rounded-lg border border-gray-200 bg-white p-4 sm:grid-cols-2 dark:border-gray-700 dark:bg-gray-800"> + + + + + + +
+ +
+
+ {/if} + + {#if data.accounts.length === 0 && !showForm} +
+ No utility or service accounts recorded for this property yet. +
+ {:else} +
+ {#each buckets as b} +
+
+ {ACCOUNT_KIND_LABEL[b.kind]} · {b.accounts.length} +
+
    + {#each b.accounts as a} +
  • + {#if editingId === a.id} +
    async ({ update, result }) => { + await update(); + if (result.type === 'success') editingId = null; + }} + class="grid gap-3 sm:grid-cols-2"> + + + + + + + +
    + + +
    +
    + {:else} +
    +
    +
    + {#if a.provider}{a.provider}{/if} + {#if a.label}· {a.label}{/if} +
    +
    + {#if a.accountNumber} + acct {a.accountNumber} + {/if} + {#if a.meterNumber} + meter {a.meterNumber} + {/if} + {#if !a.accountNumber && !a.meterNumber} + no numbers recorded + {/if} +
    + {#if a.notes}
    {a.notes}
    {/if} +
    +
    + +
    + + +
    +
    +
    + {/if} +
  • + {/each} +
+
+ {/each} +
+ {/if} +
diff --git a/src/routes/(app)/properties/[id]/assets/+page.server.ts b/src/routes/(app)/properties/[id]/assets/+page.server.ts new file mode 100644 index 0000000..6e3f999 --- /dev/null +++ b/src/routes/(app)/properties/[id]/assets/+page.server.ts @@ -0,0 +1,9 @@ +import { error } from '@sveltejs/kit'; +import { listAssets } from '$lib/server/services/assets'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const rows = await listAssets({ companyId: locals.company.id, propertyId: params.id }); + return { assets: rows }; +}; diff --git a/src/routes/(app)/properties/[id]/assets/+page.svelte b/src/routes/(app)/properties/[id]/assets/+page.svelte new file mode 100644 index 0000000..bad23bd --- /dev/null +++ b/src/routes/(app)/properties/[id]/assets/+page.svelte @@ -0,0 +1,78 @@ + + +
+
+

{data.assets.length} asset{data.assets.length === 1 ? '' : 's'} at this property.

+ + Add asset +
+ + {#if data.assets.length === 0} +
+ No assets yet at this property. +
+ {:else} +
+ {#each groups as g} +
+
+ {g.label} · {g.assets.length} +
+
+ + + + + + + + + + + {#each g.assets as a} + + + + + + + {/each} + +
NameTypeTagSerial
+ {a.name} + {a.assetTypeName}{a.tag ?? '—'}{a.serialNumber ?? '—'}
+
+
+ {/each} +
+ {/if} +
diff --git a/src/routes/(app)/properties/[id]/documents/+page.server.ts b/src/routes/(app)/properties/[id]/documents/+page.server.ts new file mode 100644 index 0000000..fec5c10 --- /dev/null +++ b/src/routes/(app)/properties/[id]/documents/+page.server.ts @@ -0,0 +1,58 @@ +import { error, fail } from '@sveltejs/kit'; +import { + deleteDocument, + listDocumentsForScope, + signedUrlForDocument, + uploadDocument +} from '$lib/server/services/documents'; +import type { Actions, PageServerLoad } from './$types'; + +const MAX_BYTES = 50 * 1024 * 1024; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const docs = await listDocumentsForScope(locals.company.id, 'property', params.id); + const enriched = await Promise.all( + docs.map(async (d) => ({ + ...d, + downloadUrl: await signedUrlForDocument(d, 'attachment'), + previewUrl: await signedUrlForDocument(d, 'inline') + })) + ); + return { documents: enriched }; +}; + +export const actions: Actions = { + upload: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const file = form.get('file'); + if (!(file instanceof File) || file.size === 0) { + return fail(400, { error: 'Pick a file to upload.' }); + } + if (file.size > MAX_BYTES) return fail(413, { error: 'File too large (max 50 MB).' }); + const buf = Buffer.from(await file.arrayBuffer()); + try { + await uploadDocument({ + companyId: locals.company.id, + uploadedBy: locals.user.id, + scopeType: 'property', + scopeId: params.id, + filename: file.name || 'upload.bin', + mimeType: file.type || 'application/octet-stream', + body: buf + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + delete: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + await deleteDocument(locals.company.id, id); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/properties/[id]/documents/+page.svelte b/src/routes/(app)/properties/[id]/documents/+page.svelte new file mode 100644 index 0000000..9609249 --- /dev/null +++ b/src/routes/(app)/properties/[id]/documents/+page.svelte @@ -0,0 +1,72 @@ + + +
+
{ + uploading = true; + return ({ update }) => update().finally(() => (uploading = false)); + }} + class="rounded-lg border border-dashed border-gray-300 bg-white p-4 dark:border-gray-700 dark:bg-gray-800" + > +
+ + +
+ {#if form?.error} +

{form.error}

+ {:else if form?.ok} +

Done.

+ {/if} +
+ + {#if data.documents.length === 0} +
+ No documents uploaded for this property yet. +
+ {:else} +
    + {#each data.documents as d} +
  • +
    + + {d.filename} + +
    + {d.mimeType} · {fmtSize(d.sizeBytes)} · {new Date(d.uploadedAt).toLocaleString()} +
    +
    +
    + Download +
    + + +
    +
    +
  • + {/each} +
+ {/if} +
diff --git a/src/routes/(app)/properties/[id]/rooms/+page.server.ts b/src/routes/(app)/properties/[id]/rooms/+page.server.ts new file mode 100644 index 0000000..f6067e2 --- /dev/null +++ b/src/routes/(app)/properties/[id]/rooms/+page.server.ts @@ -0,0 +1,122 @@ +import { error, fail } from '@sveltejs/kit'; +import { z } from 'zod'; +import { + createFloor, + createRoom, + deleteFloor, + listFloors, + listRoomsWithCounts, + softDeleteRoom, + updateFloor, + updateRoom +} from '$lib/server/services/rooms'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const [floors, rooms] = await Promise.all([ + listFloors(locals.company.id, params.id), + listRoomsWithCounts(locals.company.id, params.id) + ]); + return { floors, rooms }; +}; + +const FloorSchema = z.object({ + label: z.string().trim().min(1).max(32), + name: z.string().trim().max(255).optional().or(z.literal('')) +}); + +const RoomSchema = z.object({ + name: z.string().trim().min(1).max(255), + floor_id: z.string().uuid().optional().or(z.literal('')), + notes: z.string().trim().max(2000).optional().or(z.literal('')) +}); + +export const actions: Actions = { + createFloor: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = FloorSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + try { + await createFloor({ + companyId: locals.company.id, + propertyId: params.id, + label: parsed.data.label, + name: parsed.data.name || null + }); + } catch (e) { + const msg = (e as Error).message; + if (msg.includes('floors_property_label_uq')) { + return fail(400, { error: `A floor labeled "${parsed.data.label}" already exists.` }); + } + return fail(400, { error: msg }); + } + return { ok: true }; + }, + updateFloor: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + const label = String(form.get('label') ?? '').trim(); + const name = String(form.get('name') ?? '').trim() || null; + if (!id || !label) return fail(400, { error: 'Missing id or label' }); + try { + await updateFloor(locals.company.id, id, { label, name }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + deleteFloor: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + await deleteFloor(locals.company.id, id); + return { ok: true }; + }, + createRoom: async ({ request, locals, params }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = RoomSchema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + try { + await createRoom({ + companyId: locals.company.id, + propertyId: params.id, + floorId: parsed.data.floor_id || null, + name: parsed.data.name, + notes: parsed.data.notes || null + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + updateRoom: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + const name = String(form.get('name') ?? '').trim(); + const floorId = String(form.get('floor_id') ?? '').trim() || null; + const notes = String(form.get('notes') ?? '').trim() || null; + if (!id || !name) return fail(400, { error: 'Missing id or name' }); + try { + await updateRoom(locals.company.id, id, { name, floorId, notes }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + }, + deleteRoom: async ({ request, locals }) => { + if (!locals.company) throw error(401); + const form = await request.formData(); + const id = String(form.get('id') ?? ''); + if (!id) return fail(400, { error: 'Missing id' }); + await softDeleteRoom(locals.company.id, id); + return { ok: true }; + } +}; diff --git a/src/routes/(app)/properties/[id]/rooms/+page.svelte b/src/routes/(app)/properties/[id]/rooms/+page.svelte new file mode 100644 index 0000000..96a91a8 --- /dev/null +++ b/src/routes/(app)/properties/[id]/rooms/+page.svelte @@ -0,0 +1,215 @@ + + +
+ {#if form?.error} +
{form.error}
+ {/if} + + +
+
+

Floors

+ +
+ + {#if showFloorForm} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') showFloorForm = false; + }} + class="grid gap-3 rounded-lg border border-gray-200 bg-white p-3 sm:grid-cols-3 dark:border-gray-700 dark:bg-gray-800"> + + +
+ +
+
+ {/if} + + {#if data.floors.length === 0} +

No floors defined. Single-level? You can skip this and just add rooms.

+ {:else} +
    + {#each data.floors as f} +
  • + {#if editingFloorId === f.id} +
    async ({ update, result }) => { + await update(); + if (result.type === 'success') editingFloorId = null; + }} + class="inline-flex items-center gap-2 rounded-md border border-primary-300 bg-primary-50 px-2 py-1 text-xs dark:border-primary-700 dark:bg-primary-900/20"> + + + + + +
    + {:else} +
    + {f.label} + {#if f.name}· {f.name}{/if} + +
    + + +
    +
    + {/if} +
  • + {/each} +
+ {/if} +
+ + +
+
+

Rooms

+ +
+ + {#if showRoomForm} +
async ({ update, result }) => { + await update(); + if (result.type === 'success') showRoomForm = false; + }} + class="grid gap-3 rounded-lg border border-gray-200 bg-white p-3 sm:grid-cols-3 dark:border-gray-700 dark:bg-gray-800"> + + + +
+ +
+
+ {/if} + + {#if buckets.length === 0 || buckets.every((b) => b.rooms.length === 0)} +
+ No rooms yet. +
+ {:else} +
+ {#each buckets as b} + {#if b.rooms.length > 0} +
+
+ {#if b.floorLabel} + Floor {b.floorLabel}{b.floorName ? ` · ${b.floorName}` : ''} + {:else} + Unassigned floor + {/if} +
+
    + {#each b.rooms as r} +
  • + {#if editingRoomId === r.id} +
    async ({ update, result }) => { + await update(); + if (result.type === 'success') editingRoomId = null; + }} + class="grid gap-2 sm:grid-cols-3"> + + + + +
    + + +
    +
    + {:else} +
    +
    +
    {r.name}
    + {#if r.notes}
    {r.notes}
    {/if} +
    +
    + {r.assetCount} asset{r.assetCount === 1 ? '' : 's'} + +
    + + +
    +
    +
    + {/if} +
  • + {/each} +
+
+ {/if} + {/each} +
+ {/if} +
+
diff --git a/src/routes/(app)/properties/new/+page.server.ts b/src/routes/(app)/properties/new/+page.server.ts new file mode 100644 index 0000000..4187bc2 --- /dev/null +++ b/src/routes/(app)/properties/new/+page.server.ts @@ -0,0 +1,51 @@ +import { fail, redirect, error } from '@sveltejs/kit'; +import { z } from 'zod'; +import { createProperty } from '$lib/server/services/properties'; +import type { Actions } from './$types'; + +const PropertySchema = z.object({ + name: z.string().trim().min(1, 'Name is required').max(255), + kind: z.string().trim().max(64).optional().or(z.literal('')), + addressLine1: z.string().trim().max(255).optional().or(z.literal('')), + addressLine2: z.string().trim().max(255).optional().or(z.literal('')), + city: z.string().trim().max(128).optional().or(z.literal('')), + region: z.string().trim().max(128).optional().or(z.literal('')), + postalCode: z.string().trim().max(32).optional().or(z.literal('')), + countryCode: z.string().trim().length(2).optional().or(z.literal('')), + notes: z.string().trim().max(10_000).optional().or(z.literal('')) +}); + +function emptyToNull(s: string | undefined): string | null { + return !s ? null : s; +} + +export const actions: Actions = { + default: async ({ request, locals }) => { + if (!locals.user || !locals.company) throw error(401, 'Not authenticated'); + + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = PropertySchema.safeParse(raw); + if (!parsed.success) { + return fail(400, { + error: parsed.error.errors[0]?.message ?? 'Invalid input', + values: raw + }); + } + const v = parsed.data; + const { id } = await createProperty({ + companyId: locals.company.id, + createdBy: locals.user.id, + name: v.name, + kind: emptyToNull(v.kind), + addressLine1: emptyToNull(v.addressLine1), + addressLine2: emptyToNull(v.addressLine2), + city: emptyToNull(v.city), + region: emptyToNull(v.region), + postalCode: emptyToNull(v.postalCode), + countryCode: emptyToNull(v.countryCode), + notes: emptyToNull(v.notes) + }); + throw redirect(303, `/properties/${id}`); + } +}; diff --git a/src/routes/(app)/properties/new/+page.svelte b/src/routes/(app)/properties/new/+page.svelte new file mode 100644 index 0000000..58b7ab1 --- /dev/null +++ b/src/routes/(app)/properties/new/+page.svelte @@ -0,0 +1,92 @@ + + +
+
+

New property

+

+ A property is a place where assets live (a warehouse, an office, a datacenter, a site). +

+
+ +
{ + submitting = true; + return ({ update }) => update().finally(() => (submitting = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" + > + {#if form?.error} +
+ {form.error} +
+ {/if} + +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+ Cancel + +
+
+
diff --git a/src/routes/(app)/settings/notifications/+page.server.ts b/src/routes/(app)/settings/notifications/+page.server.ts new file mode 100644 index 0000000..d1536b9 --- /dev/null +++ b/src/routes/(app)/settings/notifications/+page.server.ts @@ -0,0 +1,42 @@ +import { fail } from '@sveltejs/kit'; +import { requireCompany } from '$lib/server/auth/guards'; +import { + getUserPrefs, + updateUserPrefs +} from '$lib/server/services/notifications'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals }) => { + const { user } = requireCompany(locals); + const prefs = await getUserPrefs(user.id); + return { + prefs, + // Client needs to know whether the transports are even configured on the + // server so we can show "(not configured)" labels. + emailAvailable: Boolean( + (process.env.SMTP_HOST && process.env.SMTP_PORT && process.env.SMTP_FROM) || false + ), + matrixAvailable: Boolean(process.env.MATRIX_HOMESERVER && process.env.MATRIX_ACCESS_TOKEN) + }; +}; + +export const actions: Actions = { + save: async ({ request, locals }) => { + const { user } = requireCompany(locals); + const form = await request.formData(); + const emailNotifications = form.get('email_notifications') === 'true'; + const matrixNotifications = form.get('matrix_notifications') === 'true'; + const matrixUserIdRaw = form.get('matrix_user_id'); + const matrixUserId = matrixUserIdRaw === null ? undefined : String(matrixUserIdRaw); + try { + await updateUserPrefs(user.id, { + emailNotifications, + matrixNotifications, + matrixUserId + }); + } catch (e) { + return fail(400, { error: (e as Error).message }); + } + return { ok: true }; + } +}; diff --git a/src/routes/(app)/settings/notifications/+page.svelte b/src/routes/(app)/settings/notifications/+page.svelte new file mode 100644 index 0000000..5f847f1 --- /dev/null +++ b/src/routes/(app)/settings/notifications/+page.svelte @@ -0,0 +1,83 @@ + + +
+
+ ← notifications +

Notification settings

+

+ In-app notifications are always on. Toggle the other channels below. +

+
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-5 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error} +
{form.error}
+ {:else if form?.ok} +
Saved.
+ {/if} + + +
+ +
+ + +
+ + +
+ +
+ +
+
+
diff --git a/src/routes/(app)/wiki/+page.server.ts b/src/routes/(app)/wiki/+page.server.ts new file mode 100644 index 0000000..ad27bf7 --- /dev/null +++ b/src/routes/(app)/wiki/+page.server.ts @@ -0,0 +1,12 @@ +import { error } from '@sveltejs/kit'; +import { listPagesForScope, searchPages } from '$lib/server/services/wiki'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, url }) => { + if (!locals.company) throw error(400, 'No active company'); + const q = url.searchParams.get('q')?.trim() ?? ''; + const pages = q + ? await searchPages({ companyId: locals.company.id, scopeType: 'global', scopeId: null, q, limit: 100 }) + : await listPagesForScope(locals.company.id, 'global', null); + return { pages, q }; +}; diff --git a/src/routes/(app)/wiki/+page.svelte b/src/routes/(app)/wiki/+page.svelte new file mode 100644 index 0000000..2ab82c1 --- /dev/null +++ b/src/routes/(app)/wiki/+page.svelte @@ -0,0 +1,53 @@ + + +
+
+
+

Wiki

+

+ Best practices, guides, and runbooks shared across the whole company. + Project- and property-scoped pages live on their respective detail pages. +

+
+ + + New page + +
+ +
+ + + {#if data.q} + clear + {/if} +
+ + {#if data.pages.length === 0} +
+ {#if data.q} + No pages match "{data.q}". + {:else} + No global wiki pages yet. Create one with the "+ New page" button. + {/if} +
+ {:else} + + {/if} +
diff --git a/src/routes/(app)/wiki/[slug]/+page.server.ts b/src/routes/(app)/wiki/[slug]/+page.server.ts new file mode 100644 index 0000000..462f502 --- /dev/null +++ b/src/routes/(app)/wiki/[slug]/+page.server.ts @@ -0,0 +1,26 @@ +import { error, fail, redirect } from '@sveltejs/kit'; +import { getPageWithCurrentRevision, softDeletePage } from '$lib/server/services/wiki'; +import { renderMarkdown } from '$lib/server/markdown'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'global', null, params.slug); + if (!found) throw error(404, 'Page not found'); + return { + page: found.page, + revision: found.revision, + editedByName: found.editedByName, + bodyHtml: renderMarkdown(found.revision.bodyMd) + }; +}; + +export const actions: Actions = { + delete: async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'global', null, params.slug); + if (!found) return fail(404, { error: 'Page not found' }); + await softDeletePage(locals.company.id, found.page.id); + throw redirect(303, '/wiki'); + } +}; diff --git a/src/routes/(app)/wiki/[slug]/+page.svelte b/src/routes/(app)/wiki/[slug]/+page.svelte new file mode 100644 index 0000000..9a13900 --- /dev/null +++ b/src/routes/(app)/wiki/[slug]/+page.svelte @@ -0,0 +1,40 @@ + + +
+
+
+ ← all pages +

{data.revision.title}

+
+ rev {data.revision.revision} + · edited {new Date(data.revision.editedAt).toLocaleString()} + {#if data.editedByName}· by {data.editedByName}{/if} + history +
+
+
+ Edit + +
+
+ + {#if confirmingDelete} +
+ Soft-delete this page? Revisions stay in the DB; the page can be re-created with the same slug to restore it. + +
+ {/if} + +
+ {@html data.bodyHtml} +
+
diff --git a/src/routes/(app)/wiki/[slug]/edit/+page.server.ts b/src/routes/(app)/wiki/[slug]/edit/+page.server.ts new file mode 100644 index 0000000..323f028 --- /dev/null +++ b/src/routes/(app)/wiki/[slug]/edit/+page.server.ts @@ -0,0 +1,44 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { getPageWithCurrentRevision, upsertPage } from '$lib/server/services/wiki'; +import type { Actions, PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'global', null, params.slug); + if (!found) throw error(404, 'Page not found'); + return { page: found.page, revision: found.revision }; +}; + +const Schema = z.object({ + title: z.string().trim().min(1).max(255), + body_md: z.string().min(1).max(200_000), + comment: z.string().trim().max(500).optional().or(z.literal('')) +}); + +export const actions: Actions = { + default: async ({ request, locals, params }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input' }); + const v = parsed.data; + try { + await upsertPage({ + companyId: locals.company.id, + editedBy: locals.user.id, + scopeType: 'global', + scopeId: null, + slug: params.slug, + title: v.title, + bodyMd: v.body_md, + comment: v.comment || null + }); + throw redirect(303, `/wiki/${params.slug}`); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message }); + } + } +}; diff --git a/src/routes/(app)/wiki/[slug]/edit/+page.svelte b/src/routes/(app)/wiki/[slug]/edit/+page.svelte new file mode 100644 index 0000000..a204c95 --- /dev/null +++ b/src/routes/(app)/wiki/[slug]/edit/+page.svelte @@ -0,0 +1,50 @@ + + +
+
+ ← back to page +

Edit · {data.revision.title}

+

+ Saving creates a new revision (currently rev {data.revision.revision}). +

+
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error}
{form.error}
{/if} + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ Cancel + +
+
+
diff --git a/src/routes/(app)/wiki/[slug]/history/+page.server.ts b/src/routes/(app)/wiki/[slug]/history/+page.server.ts new file mode 100644 index 0000000..bd82718 --- /dev/null +++ b/src/routes/(app)/wiki/[slug]/history/+page.server.ts @@ -0,0 +1,11 @@ +import { error } from '@sveltejs/kit'; +import { getPageWithCurrentRevision, listRevisions } from '$lib/server/services/wiki'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'global', null, params.slug); + if (!found) throw error(404, 'Page not found'); + const revs = await listRevisions(locals.company.id, found.page.id); + return { page: found.page, current: found.revision, revisions: revs }; +}; diff --git a/src/routes/(app)/wiki/[slug]/history/+page.svelte b/src/routes/(app)/wiki/[slug]/history/+page.svelte new file mode 100644 index 0000000..6e31382 --- /dev/null +++ b/src/routes/(app)/wiki/[slug]/history/+page.svelte @@ -0,0 +1,30 @@ + + +
+
+ ← back to page +

History · {data.current.title}

+

{data.revisions.length} revision{data.revisions.length === 1 ? '' : 's'}.

+
+ + +
diff --git a/src/routes/(app)/wiki/[slug]/revisions/[rev]/+page.server.ts b/src/routes/(app)/wiki/[slug]/revisions/[rev]/+page.server.ts new file mode 100644 index 0000000..9af6e79 --- /dev/null +++ b/src/routes/(app)/wiki/[slug]/revisions/[rev]/+page.server.ts @@ -0,0 +1,21 @@ +import { error } from '@sveltejs/kit'; +import { getPageWithCurrentRevision, getRevision } from '$lib/server/services/wiki'; +import { renderMarkdown } from '$lib/server/markdown'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ locals, params }) => { + if (!locals.company) throw error(401); + const found = await getPageWithCurrentRevision(locals.company.id, 'global', null, params.slug); + if (!found) throw error(404, 'Page not found'); + const revNum = Number.parseInt(params.rev, 10); + if (!Number.isFinite(revNum)) throw error(400, 'Invalid revision'); + const rev = await getRevision(locals.company.id, found.page.id, revNum); + if (!rev) throw error(404, 'Revision not found'); + return { + page: found.page, + current: found.revision, + revision: rev.revision, + editedByName: rev.editedByName, + bodyHtml: renderMarkdown(rev.revision.bodyMd) + }; +}; diff --git a/src/routes/(app)/wiki/[slug]/revisions/[rev]/+page.svelte b/src/routes/(app)/wiki/[slug]/revisions/[rev]/+page.svelte new file mode 100644 index 0000000..ff13654 --- /dev/null +++ b/src/routes/(app)/wiki/[slug]/revisions/[rev]/+page.svelte @@ -0,0 +1,27 @@ + + +
+
+ ← history +

{data.revision.title}

+
+ + rev {data.revision.revision}{isCurrent ? ' · current' : ''} + + {new Date(data.revision.editedAt).toLocaleString()} + {#if data.editedByName}· by {data.editedByName}{/if} + {#if !isCurrent} + view current → + {/if} +
+ {#if data.revision.comment}

{data.revision.comment}

{/if} +
+ +
+ {@html data.bodyHtml} +
+
diff --git a/src/routes/(app)/wiki/new/+page.server.ts b/src/routes/(app)/wiki/new/+page.server.ts new file mode 100644 index 0000000..f522344 --- /dev/null +++ b/src/routes/(app)/wiki/new/+page.server.ts @@ -0,0 +1,41 @@ +import { error, fail, isHttpError, isRedirect, redirect } from '@sveltejs/kit'; +import { z } from 'zod'; +import { slugify, upsertPage } from '$lib/server/services/wiki'; +import type { Actions } from './$types'; + +const Schema = z.object({ + title: z.string().trim().min(1).max(255), + slug: z.string().trim().max(128).optional().or(z.literal('')), + body_md: z.string().min(1).max(200_000), + comment: z.string().trim().max(500).optional().or(z.literal('')) +}); + +export const actions: Actions = { + default: async ({ request, locals }) => { + if (!locals.user || !locals.company) throw error(401); + const form = await request.formData(); + const raw = Object.fromEntries(form.entries()) as Record; + const parsed = Schema.safeParse(raw); + if (!parsed.success) { + return fail(400, { error: parsed.error.errors[0]?.message ?? 'Invalid input', values: raw }); + } + const v = parsed.data; + const slug = slugify(v.slug || v.title); + try { + await upsertPage({ + companyId: locals.company.id, + editedBy: locals.user.id, + scopeType: 'global', + scopeId: null, + slug, + title: v.title, + bodyMd: v.body_md, + comment: v.comment || null + }); + throw redirect(303, `/wiki/${slug}`); + } catch (e) { + if (isRedirect(e) || isHttpError(e)) throw e; + return fail(400, { error: (e as Error).message, values: raw }); + } + } +}; diff --git a/src/routes/(app)/wiki/new/+page.svelte b/src/routes/(app)/wiki/new/+page.svelte new file mode 100644 index 0000000..7bdcbc5 --- /dev/null +++ b/src/routes/(app)/wiki/new/+page.svelte @@ -0,0 +1,59 @@ + + +
+
+ ← all pages +

New wiki page

+

+ Markdown supported (GitHub-flavored). Inline HTML is rendered as plain text. +

+
+ +
{ + saving = true; + return ({ update }) => update().finally(() => (saving = false)); + }} + class="space-y-4 rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-800"> + {#if form?.error}
{form.error}
{/if} + +
+
+ + +
+
+ + +

Lowercase, dashes only — used as the URL.

+
+
+ +
+ + +
+ +
+ + +
+ +
+ Cancel + +
+
+
diff --git a/src/routes/api/documents/+server.ts b/src/routes/api/documents/+server.ts new file mode 100644 index 0000000..7143ee3 --- /dev/null +++ b/src/routes/api/documents/+server.ts @@ -0,0 +1,46 @@ +import { error, json } from '@sveltejs/kit'; +import { + uploadDocument, + type DocScope, + type UploadInput +} from '$lib/server/services/documents'; +import type { RequestHandler } from './$types'; + +const ALLOWED_SCOPES: DocScope[] = ['property', 'asset']; +const MAX_BYTES = 50 * 1024 * 1024; // 50 MB; revisit when we hit the first complaint. + +export const POST: RequestHandler = async ({ request, locals }) => { + if (!locals.user) throw error(401, 'Not authenticated'); + if (!locals.company) throw error(400, 'No active company'); + + const form = await request.formData(); + const scopeType = String(form.get('scope_type') ?? ''); + const scopeId = String(form.get('scope_id') ?? ''); + const file = form.get('file'); + + if (!ALLOWED_SCOPES.includes(scopeType as DocScope)) { + throw error(400, `Unsupported scope_type '${scopeType}'`); + } + if (!scopeId) throw error(400, 'Missing scope_id'); + if (!(file instanceof File)) throw error(400, 'Missing file'); + if (file.size > MAX_BYTES) throw error(413, `File too large (${file.size} > ${MAX_BYTES})`); + + const buf = Buffer.from(await file.arrayBuffer()); + const input: UploadInput = { + companyId: locals.company.id, + uploadedBy: locals.user.id, + scopeType: scopeType as DocScope, + scopeId, + filename: file.name || 'upload.bin', + mimeType: file.type || 'application/octet-stream', + body: buf + }; + + try { + const { id } = await uploadDocument(input); + return json({ id }, { status: 201 }); + } catch (e) { + const msg = (e as Error).message ?? 'upload failed'; + throw error(400, msg); + } +}; diff --git a/src/routes/api/qr/+server.ts b/src/routes/api/qr/+server.ts new file mode 100644 index 0000000..4a11189 --- /dev/null +++ b/src/routes/api/qr/+server.ts @@ -0,0 +1,44 @@ +import { error } from '@sveltejs/kit'; +import QRCode from 'qrcode'; +import type { RequestHandler } from './$types'; + +// Internal QR generator. Caller passes target=. +// We restrict to our own PUBLIC_BASE_URL hosts to keep this from being abused +// as an open redirect renderer. +const MAX_TARGET_LENGTH = 2048; + +export const GET: RequestHandler = async ({ url, locals }) => { + if (!locals.user) throw error(401, 'Not authenticated'); + + const target = url.searchParams.get('target'); + if (!target) throw error(400, 'Missing target'); + if (target.length > MAX_TARGET_LENGTH) throw error(400, 'target too long'); + + const size = clamp(Number.parseInt(url.searchParams.get('size') ?? '256', 10) || 256, 64, 2048); + const margin = clamp(Number.parseInt(url.searchParams.get('margin') ?? '2', 10) || 2, 0, 10); + + let svg: string; + try { + svg = await QRCode.toString(target, { + type: 'svg', + errorCorrectionLevel: 'M', + margin, + width: size, + color: { dark: '#000000', light: '#FFFFFF' } + }); + } catch (e) { + throw error(400, `QR generation failed: ${(e as Error).message}`); + } + + return new Response(svg, { + headers: { + 'content-type': 'image/svg+xml; charset=utf-8', + // Cache per-URL for a minute — they're deterministic but users rarely fetch the same one twice in a row. + 'cache-control': 'private, max-age=60' + } + }); +}; + +function clamp(n: number, lo: number, hi: number): number { + return Math.max(lo, Math.min(hi, n)); +} diff --git a/src/routes/switch-company/+server.ts b/src/routes/switch-company/+server.ts new file mode 100644 index 0000000..ee08361 --- /dev/null +++ b/src/routes/switch-company/+server.ts @@ -0,0 +1,27 @@ +import { error, redirect } from '@sveltejs/kit'; +import { and, eq } from 'drizzle-orm'; +import { db } from '$lib/server/db/client'; +import { companyUsers } from '$lib/server/db/schema/tenancy'; +import { setActiveCompany } from '$lib/server/auth/session'; +import type { RequestHandler } from './$types'; + +export const POST: RequestHandler = async ({ request, locals, url }) => { + if (!locals.user || !locals.sessionId) throw error(401, 'Not authenticated'); + + const form = await request.formData(); + const companyId = String(form.get('company_id') ?? ''); + if (!companyId) throw error(400, 'Missing company_id'); + + // Tenant guard: only allow switching to a company the user is a member of. + const [membership] = await db + .select({ id: companyUsers.id }) + .from(companyUsers) + .where(and(eq(companyUsers.userId, locals.user.id), eq(companyUsers.companyId, companyId))) + .limit(1); + if (!membership) throw error(403, 'Not a member of that company'); + + await setActiveCompany(locals.sessionId, companyId); + + const next = String(form.get('next') ?? '') || url.searchParams.get('next') || '/'; + throw redirect(303, next); +};