Skip to main content
Version: 0.15

@freshguard/freshguard-core

Namespaces

NamespaceDescription
schema-

Classes

ClassDescription
AzureSQLConnectorSecure Azure SQL Database connector
BigQueryConnectorSecure BigQuery connector
ConfigurationErrorError for configuration and validation issues
ConnectionErrorError for database connection issues
DuckDBConnectorSecure DuckDB connector
DuckDBMetadataStorage-
ErrorHandlerUtility class for error handling and sanitization
FreshGuardErrorBase class for all FreshGuard security-related errors
MonitoringErrorError for monitoring and check failures
MSSQLConnectorSecure SQL Server connector
MySQLConnectorSecure MySQL connector
PostgresConnectorSecure PostgreSQL connector
PostgreSQLMetadataStorage-
QueryErrorError for query validation and execution issues
RedshiftConnectorSecure Redshift connector
SecurityErrorError for SQL injection attempts and other security violations
SnowflakeConnectorSecure Snowflake connector
SynapseConnectorSecure Azure Synapse Analytics connector
TimeoutErrorError for operation timeouts

Interfaces

InterfaceDescription
AlertDestinationAlert destination configuration
CheckExecutionCheck execution record (stored in database)
CheckResultCheck execution result
ColumnChangeColumn change detected in schema monitoring
DataSourceData source configuration
FreshGuardConfigSelf-hosting configuration file
MetadataStorage-
MetadataStorageConfig-
MonitoringRuleMonitoring rule configuration
SchemaBaselineSchema baseline for comparison
SchemaChangesSchema changes result from monitoring
SourceCredentialsData source credentials (encrypted in production)

Type Aliases

Type AliasDescription
AlertDestinationType-
CheckStatus-
DatabaseType-safe database instance
DataSourceType-
RuleType-

Variables

VariableDescription
createErrorCreate standardized error instances

Functions

FunctionDescription
checkFreshnessCheck data freshness for a given rule with security validation.
checkSchemaChangesDetect schema changes by comparing the current table schema against a stored baseline. Returns 'alert' when columns are added, removed, or modified.
checkVolumeAnomalyCheck 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.
createDatabaseCreate a Drizzle ORM database connection to a PostgreSQL instance.
createMetadataStorageCreate and initialize a metadata storage instance.