@freshguard/freshguard-core
Namespaces
| Namespace | Description |
|---|---|
| schema | - |
Classes
| Class | Description |
|---|---|
| AzureSQLConnector | Secure Azure SQL Database connector |
| BigQueryConnector | Secure BigQuery connector |
| ConfigurationError | Error for configuration and validation issues |
| ConnectionError | Error for database connection issues |
| DuckDBConnector | Secure DuckDB connector |
| DuckDBMetadataStorage | - |
| ErrorHandler | Utility class for error handling and sanitization |
| FreshGuardError | Base class for all FreshGuard security-related errors |
| MonitoringError | Error for monitoring and check failures |
| MSSQLConnector | Secure SQL Server connector |
| MySQLConnector | Secure MySQL connector |
| PostgresConnector | Secure PostgreSQL connector |
| PostgreSQLMetadataStorage | - |
| QueryError | Error for query validation and execution issues |
| RedshiftConnector | Secure Redshift connector |
| SecurityError | Error for SQL injection attempts and other security violations |
| SnowflakeConnector | Secure Snowflake connector |
| SynapseConnector | Secure Azure Synapse Analytics connector |
| TimeoutError | Error for operation timeouts |
Interfaces
| Interface | Description |
|---|---|
| AlertDestination | Alert destination configuration |
| CheckExecution | Check execution record (stored in database) |
| CheckResult | Check execution result |
| ColumnChange | Column change detected in schema monitoring |
| DataSource | Data source configuration |
| FreshGuardConfig | Self-hosting configuration file |
| MetadataStorage | - |
| MetadataStorageConfig | - |
| MonitoringRule | Monitoring rule configuration |
| SchemaBaseline | Schema baseline for comparison |
| SchemaChanges | Schema changes result from monitoring |
| SourceCredentials | Data source credentials (encrypted in production) |
Type Aliases
| Type Alias | Description |
|---|---|
| AlertDestinationType | - |
| CheckStatus | - |
| Database | Type-safe database instance |
| DataSourceType | - |
| RuleType | - |
Variables
| Variable | Description |
|---|---|
| createError | Create standardized error instances |
Functions
| Function | Description |
|---|---|
| checkFreshness | Check data freshness for a given rule with security validation. |
| checkSchemaChanges | Detect schema changes by comparing the current table schema against a stored baseline. Returns 'alert' when columns are added, removed, or modified. |
| checkVolumeAnomaly | Check for volume anomalies by comparing the current row count against a historical baseline. Returns 'alert' when the deviation exceeds the configured threshold, or 'pending' while the baseline is being built. |
| createDatabase | Create a Drizzle ORM database connection to a PostgreSQL instance. |
| createMetadataStorage | Create and initialize a metadata storage instance. |