Use string type for host names
[MAILPOET-2693]
This commit is contained in:
committed by
Veljko V
parent
cd73faaff7
commit
35d3e6dc87
@@ -63,14 +63,7 @@ export default function normalizeSettings(data: any): Settings {
|
|||||||
mailpoet_api_key: text,
|
mailpoet_api_key: text,
|
||||||
host: text,
|
host: text,
|
||||||
port: text,
|
port: text,
|
||||||
region: asEnum([
|
region: asString('us-east-1'),
|
||||||
'us-east-1',
|
|
||||||
'us-west-2',
|
|
||||||
'eu-west-1',
|
|
||||||
'eu-central-1',
|
|
||||||
'ap-south-1',
|
|
||||||
'ap-southeast-2',
|
|
||||||
], 'us-east-1'),
|
|
||||||
access_key: text,
|
access_key: text,
|
||||||
secret_key: text,
|
secret_key: text,
|
||||||
api_key: text,
|
api_key: text,
|
||||||
@@ -91,45 +84,7 @@ export default function normalizeSettings(data: any): Settings {
|
|||||||
}),
|
}),
|
||||||
mailpoet_smtp_provider: smtpServer,
|
mailpoet_smtp_provider: smtpServer,
|
||||||
smtp_provider: smtpServer,
|
smtp_provider: smtpServer,
|
||||||
web_host: asEnum([
|
web_host: asString('manual'),
|
||||||
'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'),
|
|
||||||
mailpoet_sending_frequency: asEnum(['auto', 'manual'], 'manual'),
|
mailpoet_sending_frequency: asEnum(['auto', 'manual'], 'manual'),
|
||||||
signup_confirmation: asObject({
|
signup_confirmation: asObject({
|
||||||
enabled: enabledRadio,
|
enabled: enabledRadio,
|
||||||
|
@@ -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 = {
|
export type Settings = {
|
||||||
sender: {
|
sender: {
|
||||||
name: string
|
name: string
|
||||||
@@ -114,7 +67,7 @@ export type Settings = {
|
|||||||
mailpoet_api_key: string
|
mailpoet_api_key: string
|
||||||
host: string
|
host: string
|
||||||
port: string
|
port: string
|
||||||
region: AmazonSesRegion
|
region: string
|
||||||
access_key: string
|
access_key: string
|
||||||
secret_key: string
|
secret_key: string
|
||||||
api_key: string
|
api_key: string
|
||||||
@@ -134,7 +87,7 @@ export type Settings = {
|
|||||||
}
|
}
|
||||||
mailpoet_smtp_provider: 'server' | 'manual' | 'AmazonSES' | 'SendGrid'
|
mailpoet_smtp_provider: 'server' | 'manual' | 'AmazonSES' | 'SendGrid'
|
||||||
smtp_provider: 'server' | 'manual' | 'AmazonSES' | 'SendGrid',
|
smtp_provider: 'server' | 'manual' | 'AmazonSES' | 'SendGrid',
|
||||||
web_host: WebHostName
|
web_host: string
|
||||||
mailpoet_sending_frequency: 'auto' | 'manual'
|
mailpoet_sending_frequency: 'auto' | 'manual'
|
||||||
signup_confirmation: {
|
signup_confirmation: {
|
||||||
enabled: '1' | ''
|
enabled: '1' | ''
|
||||||
@@ -193,7 +146,7 @@ type Page = {
|
|||||||
}
|
}
|
||||||
type Hosts = {
|
type Hosts = {
|
||||||
web: {
|
web: {
|
||||||
[key in WebHostName]: {
|
[key: string]: {
|
||||||
name: string
|
name: string
|
||||||
emails: number
|
emails: number
|
||||||
interval: number
|
interval: number
|
||||||
@@ -204,7 +157,7 @@ type Hosts = {
|
|||||||
emails: number
|
emails: number
|
||||||
interval: number
|
interval: number
|
||||||
regions: {
|
regions: {
|
||||||
[key: string]: AmazonSesRegion
|
[key: string]: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SendGrid: {
|
SendGrid: {
|
||||||
|
Reference in New Issue
Block a user