You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
10 months ago
|
type MailServerFormikMailServer = {
|
||
|
address: string;
|
||
|
authentication: 'none' | 'plain-text' | 'encrypted';
|
||
|
confirmPassword?: string;
|
||
|
heloDomain: string;
|
||
|
password?: string;
|
||
|
port: number;
|
||
|
security: 'none' | 'starttls' | 'tls-ssl';
|
||
|
username?: string;
|
||
|
uuid: string;
|
||
|
};
|
||
|
|
||
|
type MailServerFormikValues = {
|
||
|
[mailServerUuid: string]: MailServerFormikMailServer;
|
||
|
};
|
||
|
|
||
|
/** AddMailServerForm */
|
||
|
|
||
|
type FormikSubmitHandler =
|
||
|
import('formik').FormikConfig<MailServerFormikValues>['onSubmit'];
|
||
|
|
||
|
type AddMailServerFormOptionalProps = {
|
||
|
localhostDomain?: string;
|
||
|
mailServerUuid?: string;
|
||
|
previousFormikValues?: MailServerFormikValues;
|
||
|
};
|
||
|
|
||
|
type AddMailServerFormProps = AddMailServerFormOptionalProps & {
|
||
|
onSubmit: (
|
||
|
tools: {
|
||
|
mailServer: MailServerFormikMailServer;
|
||
|
onConfirmCancel: FormikSubmitHandler;
|
||
|
onConfirmProceed: FormikSubmitHandler;
|
||
|
},
|
||
|
...args: Parameters<FormikSubmitHandler>
|
||
|
) => ReturnType<FormikSubmitHandler>;
|
||
|
};
|
||
|
|
||
|
/** EditMailServerForm */
|
||
|
|
||
|
type EditMailServerFormProps = Required<
|
||
|
Omit<AddMailServerFormProps, 'localhostDomain'>
|
||
|
>;
|