86 lines
1.5 KiB
TypeScript
86 lines
1.5 KiB
TypeScript
import type { IBaseConfig, IRateLimitConfig } from './base.config.js';
|
|
|
|
/**
|
|
* SMS service configuration
|
|
*/
|
|
export interface ISmsConfig extends IBaseConfig {
|
|
/**
|
|
* API token for the gateway service
|
|
*/
|
|
apiGatewayApiToken: string;
|
|
|
|
/**
|
|
* Default sender ID or phone number
|
|
*/
|
|
defaultSender?: string;
|
|
|
|
/**
|
|
* SMS rate limiting
|
|
*/
|
|
rateLimit?: IRateLimitConfig & {
|
|
/**
|
|
* Maximum messages per recipient per day
|
|
*/
|
|
maxPerRecipientPerDay?: number;
|
|
};
|
|
|
|
/**
|
|
* SMS provider configuration
|
|
*/
|
|
provider?: {
|
|
/**
|
|
* Provider type
|
|
*/
|
|
type?: 'gateway' | 'twilio' | 'other';
|
|
|
|
/**
|
|
* Provider-specific configuration
|
|
*/
|
|
config?: Record<string, any>;
|
|
|
|
/**
|
|
* Fallback provider configuration
|
|
*/
|
|
fallback?: {
|
|
/**
|
|
* Whether to use fallback provider
|
|
*/
|
|
enabled?: boolean;
|
|
|
|
/**
|
|
* Provider type
|
|
*/
|
|
type?: 'gateway' | 'twilio' | 'other';
|
|
|
|
/**
|
|
* Provider-specific configuration
|
|
*/
|
|
config?: Record<string, any>;
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Verification code settings
|
|
*/
|
|
verification?: {
|
|
/**
|
|
* Code length
|
|
*/
|
|
codeLength?: number;
|
|
|
|
/**
|
|
* Code expiration time in seconds
|
|
*/
|
|
expirationSeconds?: number;
|
|
|
|
/**
|
|
* Maximum number of attempts
|
|
*/
|
|
maxAttempts?: number;
|
|
|
|
/**
|
|
* Cooldown period in seconds
|
|
*/
|
|
cooldownSeconds?: number;
|
|
};
|
|
} |