100 lines
2.2 KiB
TypeScript
100 lines
2.2 KiB
TypeScript
|
// Export configuration interfaces
|
||
|
export * from './base.config.js';
|
||
|
export * from './email.config.js';
|
||
|
export * from './sms.config.js';
|
||
|
export * from './platform.config.js';
|
||
|
|
||
|
// Export validation tools
|
||
|
export * from './validator.js';
|
||
|
export * from './schemas.js';
|
||
|
|
||
|
// Re-export commonly used types
|
||
|
import type { IPlatformConfig } from './platform.config.js';
|
||
|
import type { IEmailConfig, IMtaConfig } from './email.config.js';
|
||
|
import type { ISmsConfig } from './sms.config.js';
|
||
|
import type {
|
||
|
IBaseConfig,
|
||
|
ITlsConfig,
|
||
|
IHttpServerConfig,
|
||
|
IRateLimitConfig,
|
||
|
IQueueConfig
|
||
|
} from './base.config.js';
|
||
|
|
||
|
// Default platform configuration
|
||
|
export const defaultConfig: IPlatformConfig = {
|
||
|
id: 'platform-service-config',
|
||
|
version: '1.0.0',
|
||
|
environment: 'production',
|
||
|
name: 'PlatformService',
|
||
|
enabled: true,
|
||
|
logging: {
|
||
|
level: 'info',
|
||
|
structured: true,
|
||
|
correlationTracking: true
|
||
|
},
|
||
|
server: {
|
||
|
enabled: true,
|
||
|
host: '0.0.0.0',
|
||
|
port: 3000,
|
||
|
cors: true
|
||
|
},
|
||
|
email: {
|
||
|
useMta: true,
|
||
|
mtaConfig: {
|
||
|
smtp: {
|
||
|
enabled: true,
|
||
|
port: 25,
|
||
|
hostname: 'mta.lossless.one',
|
||
|
maxSize: 10 * 1024 * 1024 // 10MB
|
||
|
},
|
||
|
tls: {
|
||
|
domain: 'mta.lossless.one',
|
||
|
autoRenew: true
|
||
|
},
|
||
|
security: {
|
||
|
useDkim: true,
|
||
|
verifyDkim: true,
|
||
|
verifySpf: true,
|
||
|
verifyDmarc: true,
|
||
|
enforceDmarc: true,
|
||
|
useTls: true,
|
||
|
requireValidCerts: false,
|
||
|
securityLogLevel: 'warn',
|
||
|
checkIPReputation: true,
|
||
|
scanContent: true,
|
||
|
maliciousContentAction: 'tag',
|
||
|
threatScoreThreshold: 50,
|
||
|
rejectHighRiskIPs: false
|
||
|
},
|
||
|
domains: {
|
||
|
local: ['lossless.one'],
|
||
|
autoCreateDnsRecords: true,
|
||
|
dkimSelector: 'mta'
|
||
|
}
|
||
|
},
|
||
|
templateConfig: {
|
||
|
from: 'no-reply@lossless.one',
|
||
|
replyTo: 'support@lossless.one'
|
||
|
},
|
||
|
loadTemplatesFromDir: true
|
||
|
},
|
||
|
paths: {
|
||
|
dataDir: 'data',
|
||
|
logsDir: 'logs',
|
||
|
tempDir: 'temp',
|
||
|
emailTemplatesDir: 'templates/email'
|
||
|
}
|
||
|
};
|
||
|
|
||
|
// Export main types for convenience
|
||
|
export type {
|
||
|
IPlatformConfig,
|
||
|
IEmailConfig,
|
||
|
IMtaConfig,
|
||
|
ISmsConfig,
|
||
|
IBaseConfig,
|
||
|
ITlsConfig,
|
||
|
IHttpServerConfig,
|
||
|
IRateLimitConfig,
|
||
|
IQueueConfig
|
||
|
};
|