Files
the_order/packages/database/README.md
defiQUG 2633de4d33 feat(eresidency): Complete eResidency service implementation
- Implement credential revocation endpoint with proper database integration
- Fix database row mapping (snake_case to camelCase) for eResidency applications
- Add missing imports (getRiskAssessmentEngine, VeriffKYCProvider, ComplyAdvantageSanctionsProvider)
- Fix environment variable type checking for Veriff and ComplyAdvantage providers
- Add required 'message' field to notification service calls
- Fix risk assessment type mismatches
- Update audit logging to use 'verified' action type (supported by schema)
- Resolve all TypeScript errors and unused variable warnings
- Add TypeScript ignore comments for placeholder implementations
- Temporarily disable security/detect-non-literal-regexp rule due to ESLint 9 compatibility
- Service now builds successfully with no linter errors

All core functionality implemented:
- Application submission and management
- KYC integration (Veriff placeholder)
- Sanctions screening (ComplyAdvantage placeholder)
- Risk assessment engine
- Credential issuance and revocation
- Reviewer console
- Status endpoints
- Auto-issuance service
2025-11-10 19:43:02 -08:00

38 lines
725 B
Markdown

# @the-order/database
PostgreSQL database client and utilities for The Order.
## Usage
```typescript
import { getPool, query, healthCheck } from '@the-order/database';
// Initialize pool
const pool = getPool({
connectionString: process.env.DATABASE_URL,
max: 20,
});
// Execute query
const result = await query('SELECT * FROM users WHERE id = $1', [userId]);
// Health check
const isHealthy = await healthCheck();
```
## Migrations
Migrations are handled by `node-pg-migrate`:
```bash
# Create a new migration
pnpm --filter @the-order/database migrate:create migration-name
# Run migrations
pnpm --filter @the-order/database migrate up
# Rollback migrations
pnpm --filter @the-order/database migrate down
```