feat: add workapp mail sync API

This commit is contained in:
2026-04-29 16:29:38 +00:00
parent a22cc1c0eb
commit 5fbe2eb80b
9 changed files with 773 additions and 4 deletions
+52
View File
@@ -54,3 +54,55 @@ export interface IWorkAppRouteSyncResult {
routeId?: string;
message?: string;
}
export interface IWorkAppMailOwnership {
workHosterType: 'onebox' | 'cloudly' | 'custom';
workHosterId: string;
workAppId: string;
}
export interface IWorkAppMailInboundRoute {
enabled: boolean;
targetHost: string;
targetPort: number;
preserveHeaders?: boolean;
addHeaders?: Record<string, string>;
}
export interface IWorkAppMailIdentity {
id: string;
externalKey: string;
ownership: IWorkAppMailOwnership;
address: string;
localPart: string;
domain: string;
enabled: boolean;
displayName?: string;
inbound?: IWorkAppMailInboundRoute;
smtp: {
enabled: boolean;
username: string;
};
createdAt: number;
updatedAt: number;
createdBy: string;
}
export interface IWorkAppMailCredentials {
username: string;
password: string;
host?: string;
ports?: {
smtp?: number;
submission?: number;
smtps?: number;
};
}
export interface IWorkAppMailIdentitySyncResult {
success: boolean;
action?: 'created' | 'updated' | 'deleted' | 'unchanged';
identity?: IWorkAppMailIdentity;
smtpCredentials?: IWorkAppMailCredentials;
message?: string;
}