defineConfig
defineConfig(
config):object
Defined in: src/config/define-config.ts:12
Identity helper for type-safe config authoring:
import { defineConfig } from 'fast-classifier/config'export default defineConfig({ categories: [...], rules: [...] })Parameters
Section titled “Parameters”config
Section titled “config”categories?
Section titled “categories?”object[] = ...
detection?
Section titled “detection?”{ accountCategory?: string; accountDomains?: string[]; automatedNamePattern?: string; brandNamePattern?: string; personalCategory?: string; personalDomains?: string[]; personalProviderDomains?: string[]; personalProviderPattern?: string; personalReplyExclusionPattern?: string; relayDomains?: string[]; } = detectionSchema
detection.accountCategory?
Section titled “detection.accountCategory?”string = ...
detection.accountDomains?
Section titled “detection.accountDomains?”string[] = ...
detection.automatedNamePattern?
Section titled “detection.automatedNamePattern?”string = ...
regex source, case-insensitive, matched against the from ADDRESS
detection.brandNamePattern?
Section titled “detection.brandNamePattern?”string = ...
regex source, case-insensitive, matched against address + display name
detection.personalCategory?
Section titled “detection.personalCategory?”string = ...
detection.personalDomains?
Section titled “detection.personalDomains?”string[] = ...
the user’s own domains — anything sent from them files as personal
detection.personalProviderDomains?
Section titled “detection.personalProviderDomains?”string[] = ...
detection.personalProviderPattern?
Section titled “detection.personalProviderPattern?”string = ...
regex source, case-insensitive: freemail providers (needs-action heuristic)
detection.personalReplyExclusionPattern?
Section titled “detection.personalReplyExclusionPattern?”string = ...
regex source, case-insensitive: senders excluded from the needs-reply bonus
detection.relayDomains?
Section titled “detection.relayDomains?”string[] = ...
keepList?
Section titled “keepList?”string[] = ...
exact sender addresses that must never be swept (checked twice)
needsAction?
Section titled “needsAction?”{ exclusionKeywords?: object[]; highKeywords?: object[]; label?: string; languages?: ("en" | "de")[]; personalNeedsReplyBonus?: number; threshold?: number; unreadBonus?: number; windowDays?: number; } = needsActionSchema
needsAction.exclusionKeywords?
Section titled “needsAction.exclusionKeywords?”object[] = ...
when present, REPLACES the language packs entirely
needsAction.highKeywords?
Section titled “needsAction.highKeywords?”object[] = ...
when present, REPLACES the language packs entirely
needsAction.label?
Section titled “needsAction.label?”string = ...
needsAction.languages?
Section titled “needsAction.languages?”("en" | "de")[] = ...
built-in keyword packs to enable — English-only by default
needsAction.personalNeedsReplyBonus?
Section titled “needsAction.personalNeedsReplyBonus?”number = ...
needsAction.threshold?
Section titled “needsAction.threshold?”number = ...
needsAction.unreadBonus?
Section titled “needsAction.unreadBonus?”number = ...
needsAction.windowDays?
Section titled “needsAction.windowDays?”number = ...
how far back to scan
{ batchDelayMs?: number; batchSize?: number; maxItems?: number; progressEvery?: number; stallBackoffMs?: number; stallLimit?: number; } = opsSchema
ops.batchDelayMs?
Section titled “ops.batchDelayMs?”number = ...
ops.batchSize?
Section titled “ops.batchSize?”number = ...
ops.maxItems?
Section titled “ops.maxItems?”number = ...
ops.progressEvery?
Section titled “ops.progressEvery?”number = ...
ops.stallBackoffMs?
Section titled “ops.stallBackoffMs?”number = ...
ops.stallLimit?
Section titled “ops.stallLimit?”number = ...
provider?
Section titled “provider?”{ baseUrl?: string; type?: "jmap" | "mcp"; } = ...
provider.baseUrl?
Section titled “provider.baseUrl?”string = ...
override endpoints (testing / self-hosted JMAP)
provider.type?
Section titled “provider.type?”"jmap" | "mcp" = ...
rules?
Section titled “rules?”({ address: string; category: string; kind: "sender"; } | { category: string; domain: string; kind: "domain"; } | { category: string; kind: "name"; onlyForDomains?: string[]; pattern: string; })[] = ...
sweep?
Section titled “sweep?”{ after?: string; targetLabel?: string; textHeuristic?: string; } = sweepSchema
sweep.after?
Section titled “sweep.after?”string = ...
sweep.targetLabel?
Section titled “sweep.targetLabel?”string = ...
sweep.textHeuristic?
Section titled “sweep.textHeuristic?”string = ...
full-text heuristic identifying bulk mail
Returns
Section titled “Returns”categories?
Section titled “categories?”
optionalcategories?:object[]
detection?
Section titled “detection?”
optionaldetection?:object=detectionSchema
detection.accountCategory?
Section titled “detection.accountCategory?”
optionalaccountCategory?:string
detection.accountDomains?
Section titled “detection.accountDomains?”
optionalaccountDomains?:string[]
detection.automatedNamePattern?
Section titled “detection.automatedNamePattern?”
optionalautomatedNamePattern?:string
regex source, case-insensitive, matched against the from ADDRESS
detection.brandNamePattern?
Section titled “detection.brandNamePattern?”
optionalbrandNamePattern?:string
regex source, case-insensitive, matched against address + display name
detection.personalCategory?
Section titled “detection.personalCategory?”
optionalpersonalCategory?:string
detection.personalDomains?
Section titled “detection.personalDomains?”
optionalpersonalDomains?:string[]
the user’s own domains — anything sent from them files as personal
detection.personalProviderDomains?
Section titled “detection.personalProviderDomains?”
optionalpersonalProviderDomains?:string[]
detection.personalProviderPattern?
Section titled “detection.personalProviderPattern?”
optionalpersonalProviderPattern?:string
regex source, case-insensitive: freemail providers (needs-action heuristic)
detection.personalReplyExclusionPattern?
Section titled “detection.personalReplyExclusionPattern?”
optionalpersonalReplyExclusionPattern?:string
regex source, case-insensitive: senders excluded from the needs-reply bonus
detection.relayDomains?
Section titled “detection.relayDomains?”
optionalrelayDomains?:string[]
keepList?
Section titled “keepList?”
optionalkeepList?:string[]
exact sender addresses that must never be swept (checked twice)
needsAction?
Section titled “needsAction?”
optionalneedsAction?:object=needsActionSchema
needsAction.exclusionKeywords?
Section titled “needsAction.exclusionKeywords?”
optionalexclusionKeywords?:object[]
when present, REPLACES the language packs entirely
needsAction.highKeywords?
Section titled “needsAction.highKeywords?”
optionalhighKeywords?:object[]
when present, REPLACES the language packs entirely
needsAction.label?
Section titled “needsAction.label?”
optionallabel?:string
needsAction.languages?
Section titled “needsAction.languages?”
optionallanguages?: ("en"|"de")[]
built-in keyword packs to enable — English-only by default
needsAction.personalNeedsReplyBonus?
Section titled “needsAction.personalNeedsReplyBonus?”
optionalpersonalNeedsReplyBonus?:number
needsAction.threshold?
Section titled “needsAction.threshold?”
optionalthreshold?:number
needsAction.unreadBonus?
Section titled “needsAction.unreadBonus?”
optionalunreadBonus?:number
needsAction.windowDays?
Section titled “needsAction.windowDays?”
optionalwindowDays?:number
how far back to scan
optionalops?:object=opsSchema
ops.batchDelayMs?
Section titled “ops.batchDelayMs?”
optionalbatchDelayMs?:number
ops.batchSize?
Section titled “ops.batchSize?”
optionalbatchSize?:number
ops.maxItems?
Section titled “ops.maxItems?”
optionalmaxItems?:number
ops.progressEvery?
Section titled “ops.progressEvery?”
optionalprogressEvery?:number
ops.stallBackoffMs?
Section titled “ops.stallBackoffMs?”
optionalstallBackoffMs?:number
ops.stallLimit?
Section titled “ops.stallLimit?”
optionalstallLimit?:number
provider?
Section titled “provider?”
optionalprovider?:object
provider.baseUrl?
Section titled “provider.baseUrl?”
optionalbaseUrl?:string
override endpoints (testing / self-hosted JMAP)
provider.type?
Section titled “provider.type?”
optionaltype?:"jmap"|"mcp"
rules?
Section titled “rules?”
optionalrules?: ({address:string;category:string;kind:"sender"; } | {category:string;domain:string;kind:"domain"; } | {category:string;kind:"name";onlyForDomains?:string[];pattern:string; })[]
sweep?
Section titled “sweep?”
optionalsweep?:object=sweepSchema
sweep.after?
Section titled “sweep.after?”
optionalafter?:string
sweep.targetLabel?
Section titled “sweep.targetLabel?”
optionaltargetLabel?:string
sweep.textHeuristic?
Section titled “sweep.textHeuristic?”
optionaltextHeuristic?:string
full-text heuristic identifying bulk mail