Auto-commit 2026-05-02 09:37
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
export const spamRateLimits = {
|
||||
BASIC: 100,
|
||||
PLUS: 500,
|
||||
PREMIUM: 2000,
|
||||
export type SubscriptionTier = 'BASIC' | 'PLUS' | 'PREMIUM';
|
||||
|
||||
export interface TierRateLimits {
|
||||
perMinute: number;
|
||||
perDay: number;
|
||||
}
|
||||
|
||||
export type SubscriptionTierRateLimits = Record<SubscriptionTier, TierRateLimits>;
|
||||
|
||||
export const spamRateLimits: SubscriptionTierRateLimits = {
|
||||
BASIC: { perMinute: 100, perDay: 1000 },
|
||||
PLUS: { perMinute: 500, perDay: 5000 },
|
||||
PREMIUM: { perMinute: 2000, perDay: 20000 },
|
||||
} as const;
|
||||
|
||||
export const spamFeatureFlagDefaults = {
|
||||
@@ -47,7 +56,27 @@ export const spamConfig = {
|
||||
maxPhoneNumberLength: 20,
|
||||
minPhoneNumberLength: 10,
|
||||
defaultConfidenceThreshold: 0.7,
|
||||
maxMetadataSize: 1024 * 10,
|
||||
maxMetadataSize: 1024 * 4,
|
||||
circuitBreakerThreshold: 5,
|
||||
circuitBreakerTimeout: 60000,
|
||||
} as const;
|
||||
|
||||
export const metadataLimits = {
|
||||
maxMetadataSizeBytes: 4096,
|
||||
maxMetadataKeys: 20,
|
||||
maxMetadataValueSizeBytes: 512,
|
||||
} as const;
|
||||
|
||||
/** Reputation and Spam Score Constants */
|
||||
export const defaultReputationConfidence = 0.7;
|
||||
export const defaultSpamScore = 0.0;
|
||||
export const highReputationThreshold = 0.8;
|
||||
export const lowReputationThreshold = 0.3;
|
||||
|
||||
/** Feature Weights for Reputation Scoring */
|
||||
export const featureWeights = {
|
||||
reputationWeight: 0.4,
|
||||
ruleWeight: 0.3,
|
||||
behavioralWeight: 0.2,
|
||||
userHistoryWeight: 0.1,
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user