panels-origin/api
Cursor Agent f3179444bf
refactor(api): migrate main.ts CRUD routes to PostgreSQL RPC
Replace all db.prepare() calls in main.ts with callCoreFn and the
respondRpc/respondApiError HTTP envelope helpers. Company and project
routes use the RPC response pattern; worker, budget, badge, catalog,
and tenant settings endpoints call their matching core.fn_* functions.

Adds app.onError(onAppError) for consistent error handling. Keeps
companies.ts wrappers, excel.ts document storage, and auth/PDF/S3
unchanged.

Co-authored-by: alberto.martinez <alberto.martinez@mrdev.mx>
2026-09-03 23:59:00 +00:00
..
assets/email Agregando diseño de correo 2026-08-21 20:02:27 -05:00
scripts api: --allow-sys para el SDK de AWS/R2 en Deno 2026-09-03 05:49:14 +00:00
auth.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
budget.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
budget_test.ts first commit 2026-08-21 16:55:01 -05:00
cache.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
companies.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
companies_test.ts first commit 2026-08-21 16:55:01 -05:00
config.ts api: ping R2 con ListObjects, no HeadBucket 2026-09-03 05:42:13 +00:00
crypto.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
db.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
deno.json api: --allow-sys para el SDK de AWS/R2 en Deno 2026-09-03 05:49:14 +00:00
deno.lock db/infra: ETL de datos, backups y limpieza de despliegue (fase 5-7) 2026-09-02 21:05:07 +00:00
docs_crypto.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
document_validity.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
document_validity_test.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
email_assets.ts Agregando diseño de correo 2026-08-21 20:02:27 -05:00
excel.ts Refactor payroll_http and excel to use core RPC functions 2026-09-03 23:57:36 +00:00
http_errors.ts Refactor payroll_http and excel to use core RPC functions 2026-09-03 23:57:36 +00:00
iam_db.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
mail.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
main.ts refactor(api): migrate main.ts CRUD routes to PostgreSQL RPC 2026-09-03 23:59:00 +00:00
mx.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
mx_test.ts first commit 2026-08-21 16:55:01 -05:00
payroll.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
payroll_http.ts Refactor payroll_http and excel to use core RPC functions 2026-09-03 23:57:36 +00:00
payroll_test.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
pdf.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
pg.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
platform_db.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
redis.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
rpc.ts Refactor payroll_http and excel to use core RPC functions 2026-09-03 23:57:36 +00:00
saas.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
scope.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
seed_lista.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
sessions.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
smtp.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00
storage.ts api: ping R2 con ListObjects, no HeadBucket 2026-09-03 05:42:13 +00:00
test_helpers.ts api: migrar todo el backend de SQLite a Postgres + Redis (fase 2-4e) 2026-09-02 20:47:45 +00:00