add mail type and validation
This commit is contained in:
parent
2e3d0a755c
commit
ce9f621b8b
11 changed files with 193 additions and 19 deletions
|
@ -13,6 +13,7 @@ export type SettingString =
|
|||
| "session.jwt_expiration"
|
||||
| "session.refresh_expiration"
|
||||
| "session.pwa_refresh_expiration"
|
||||
| "mail.email"
|
||||
| "mail.username"
|
||||
| "mail.password"
|
||||
| "mail.host"
|
||||
|
@ -21,7 +22,7 @@ export type SettingString =
|
|||
| "backup.interval"
|
||||
| "backup.copies";
|
||||
|
||||
export type SettingTypeAtom = "longstring" | "string" | "ms" | "number" | "boolean" | "url";
|
||||
export type SettingTypeAtom = "longstring" | "string" | "ms" | "number" | "boolean" | "url" | "email";
|
||||
export type SettingType = SettingTypeAtom | `${SettingTypeAtom}/crypt` | `${SettingTypeAtom}/rand`;
|
||||
|
||||
export type SettingValueMapping = {
|
||||
|
@ -36,6 +37,7 @@ export type SettingValueMapping = {
|
|||
"session.jwt_expiration": ms.StringValue;
|
||||
"session.refresh_expiration": ms.StringValue;
|
||||
"session.pwa_refresh_expiration": ms.StringValue;
|
||||
"mail.email": string;
|
||||
"mail.username": string;
|
||||
"mail.password": string;
|
||||
"mail.host": string;
|
||||
|
@ -69,6 +71,7 @@ export const settingsType: SettingsSchema = {
|
|||
"session.jwt_expiration": { type: "ms", default: "15m" },
|
||||
"session.refresh_expiration": { type: "ms", default: "1d" },
|
||||
"session.pwa_refresh_expiration": { type: "ms", default: "5d" },
|
||||
"mail.email": { type: "email", optional: false },
|
||||
"mail.username": { type: "string", optional: false },
|
||||
"mail.password": { type: "string/crypt", optional: false },
|
||||
"mail.host": { type: "url", optional: false },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue