fix(mail): align queue, outbound hostname, and DKIM selector behavior across the mail server APIs

This commit is contained in:
2026-04-14 12:17:50 +00:00
parent 04e73c366c
commit 65ecd94540
15 changed files with 387 additions and 147 deletions

View File

@@ -0,0 +1,13 @@
export interface IStorageManagerLike {
get?(key: string): Promise<string | null>;
set?(key: string, value: string): Promise<void>;
list?(prefix: string): Promise<string[]>;
delete?(key: string): Promise<void>;
}
export function hasStorageManagerMethods<T extends keyof IStorageManagerLike>(
storageManager: IStorageManagerLike | undefined,
methods: T[],
): storageManager is IStorageManagerLike & Required<Pick<IStorageManagerLike, T>> {
return !!storageManager && methods.every((method) => typeof storageManager[method] === 'function');
}