diff --git a/assets/js/src/settings/store/normalize_settings.ts b/assets/js/src/settings/store/normalize_settings.ts index a55e6af678..bde647dc8f 100644 --- a/assets/js/src/settings/store/normalize_settings.ts +++ b/assets/js/src/settings/store/normalize_settings.ts @@ -63,14 +63,7 @@ export default function normalizeSettings(data: any): Settings { mailpoet_api_key: text, host: text, port: text, - region: asEnum([ - 'us-east-1', - 'us-west-2', - 'eu-west-1', - 'eu-central-1', - 'ap-south-1', - 'ap-southeast-2', - ], 'us-east-1'), + region: asString('us-east-1'), access_key: text, secret_key: text, api_key: text, @@ -91,45 +84,7 @@ export default function normalizeSettings(data: any): Settings { }), mailpoet_smtp_provider: smtpServer, smtp_provider: smtpServer, - web_host: asEnum([ - 'manual', - '1and1', - 'bluehost', - 'df', - 'dreamhost', - 'free', - 'froghost', - 'godaddy', - 'goneo', - 'googleapps', - 'greengeeks', - 'hawkhost', - 'hivetec', - 'hostgator', - 'hosting2go', - 'hostmonster', - 'infomaniak', - 'justhost', - 'laughingsquid', - 'lunarpages', - 'mediatemple', - 'netfirms', - 'netissime', - 'one', - 'ovh', - 'phpnet', - 'planethoster', - 'rochen', - 'site5', - 'siteground', - 'synthesis', - 'techark', - 'vexxhost', - 'vps', - 'webcity', - 'westhost', - 'wpwebhost', - ], 'manual'), + web_host: asString('manual'), mailpoet_sending_frequency: asEnum(['auto', 'manual'], 'manual'), signup_confirmation: asObject({ enabled: enabledRadio, diff --git a/assets/js/src/settings/store/types.ts b/assets/js/src/settings/store/types.ts index 0f810c1dad..47ed7ff729 100644 --- a/assets/js/src/settings/store/types.ts +++ b/assets/js/src/settings/store/types.ts @@ -1,50 +1,3 @@ -type WebHostName = - | 'manual' - | '1and1' - | 'bluehost' - | 'df' - | 'dreamhost' - | 'free' - | 'froghost' - | 'godaddy' - | 'goneo' - | 'googleapps' - | 'greengeeks' - | 'hawkhost' - | 'hivetec' - | 'hostgator' - | 'hosting2go' - | 'hostmonster' - | 'infomaniak' - | 'justhost' - | 'laughingsquid' - | 'lunarpages' - | 'mediatemple' - | 'netfirms' - | 'netissime' - | 'one' - | 'ovh' - | 'phpnet' - | 'planethoster' - | 'rochen' - | 'site5' - | 'siteground' - | 'synthesis' - | 'techark' - | 'vexxhost' - | 'vps' - | 'webcity' - | 'westhost' - | 'wpwebhost' - -type AmazonSesRegion = - | 'us-east-1' - | 'us-west-2' - | 'eu-west-1' - | 'eu-central-1' - | 'ap-south-1' - | 'ap-southeast-2' - export type Settings = { sender: { name: string @@ -114,7 +67,7 @@ export type Settings = { mailpoet_api_key: string host: string port: string - region: AmazonSesRegion + region: string access_key: string secret_key: string api_key: string @@ -134,7 +87,7 @@ export type Settings = { } mailpoet_smtp_provider: 'server' | 'manual' | 'AmazonSES' | 'SendGrid' smtp_provider: 'server' | 'manual' | 'AmazonSES' | 'SendGrid', - web_host: WebHostName + web_host: string mailpoet_sending_frequency: 'auto' | 'manual' signup_confirmation: { enabled: '1' | '' @@ -193,7 +146,7 @@ type Page = { } type Hosts = { web: { - [key in WebHostName]: { + [key: string]: { name: string emails: number interval: number @@ -204,7 +157,7 @@ type Hosts = { emails: number interval: number regions: { - [key: string]: AmazonSesRegion + [key: string]: string } } SendGrid: {