import * as simpleRegexpBuiltIns from './built-ins/simple-regexp-patterns'; export interface ISyncRedactor { redact(textToRedact: string): string; } export interface IAsyncRedactor { redactAsync(textToRedact: string): Promise; } export type IRedactor = ISyncRedactor | IAsyncRedactor; export interface SimpleRegexpCustomRedactorConfig { regexpPattern: RegExp; replaceWith: string; } export type SyncCustomRedactorConfig = SimpleRegexpCustomRedactorConfig | ISyncRedactor; export type AsyncCustomRedactorConfig = SyncCustomRedactorConfig | IAsyncRedactor; export interface CompositeRedactorOptions { globalReplaceWith?: string; builtInRedactors?: { [RedactorName in keyof typeof simpleRegexpBuiltIns | 'names']?: { enabled?: boolean; replaceWith?: string; }; }; customRedactors?: { before?: Array; after?: Array; }; }