feat: add name.com support

This commit is contained in:
Maël Gangloff
2025-01-06 22:58:00 +01:00
parent e92b323180
commit 56bda420d9
7 changed files with 355 additions and 188 deletions

View File

@@ -2,10 +2,11 @@ import {request} from './index'
import type {ConnectorElement} from '../../components/tracking/connector/ConnectorsList'
export enum ConnectorProvider {
OVH = 'ovh',
GANDI = 'gandi',
AUTODNS = 'autodns',
NAMECHEAP = 'namecheap'
OVHcloud = 'ovh',
Gandi = 'gandi',
AutoDNS = 'autodns',
Namecheap = 'namecheap',
'Name.com' = 'namecom'
}
export interface Connector {

View File

@@ -5,7 +5,7 @@ import React from 'react'
export const helpGetTokenLink = (provider?: string) => {
switch (provider) {
case ConnectorProvider.OVH:
case ConnectorProvider.OVHcloud:
return (
<Typography.Link
target='_blank'
@@ -15,24 +15,30 @@ export const helpGetTokenLink = (provider?: string) => {
</Typography.Link>
)
case ConnectorProvider.GANDI:
case ConnectorProvider.Gandi:
return (
<Typography.Link target='_blank' href='https://admin.gandi.net/organizations/account/pat'>
{t`Retrieve a Personal Access Token from your customer account on the Provider's website`}
</Typography.Link>
)
case ConnectorProvider.NAMECHEAP:
case ConnectorProvider.Namecheap:
return (
<Typography.Link target='_blank' href='https://ap.www.namecheap.com/settings/tools/apiaccess/'>
{t`Retreive an API key and whitelist this instance's IP address on Namecheap's website`}
</Typography.Link>
)
case ConnectorProvider.AUTODNS:
case ConnectorProvider.AutoDNS:
return (
<Typography.Link target='_blank' href='https://en.autodns.com/domain-robot-api/'>
{t`Because of some limitations in API of AutoDNS, we suggest to create an dedicated user for API with limited rights`}
</Typography.Link>
)
case ConnectorProvider['Name.com']:
return (
<Typography.Link target='_blank' href='https://www.name.com/account/settings/api'>
{t`Retrieve a set of tokens from your customer account on the Provider's website`}
</Typography.Link>
)
default:
return <></>
}
@@ -40,14 +46,16 @@ export const helpGetTokenLink = (provider?: string) => {
export const tosHyperlink = (provider?: string) => {
switch (provider) {
case ConnectorProvider.OVH:
return 'https://www.ovhcloud.com/fr/terms-and-conditions/contracts/'
case ConnectorProvider.GANDI:
case ConnectorProvider.OVHcloud:
return 'https://www.ovhcloud.com/en/terms-and-conditions/contracts/'
case ConnectorProvider.Gandi:
return 'https://www.gandi.net/en/contracts/terms-of-service'
case ConnectorProvider.NAMECHEAP:
case ConnectorProvider.Namecheap:
return 'https://www.namecheap.com/legal/universal/universal-tos/'
case ConnectorProvider.AUTODNS:
case ConnectorProvider.AutoDNS:
return 'https://www.internetx.com/agb/'
case ConnectorProvider['Name.com']:
return 'https://www.name.com/policies/'
default:
return ''
}