fix: add token link help

This commit is contained in:
Maël Gangloff
2025-02-19 00:54:04 +01:00
parent 34ea4dd37c
commit 27e60e566a
7 changed files with 110 additions and 74 deletions

View File

@@ -17,34 +17,28 @@ export const formItemLayoutWithOutLabel = {
export type ProviderConfig = {
tosLink: string
tokenLink: string
form: ({form, onCreate}: { form: FormInstance, onCreate: (values: Connector) => void }) => React.ReactElement
}
export const providersConfig: Record<ConnectorProvider, ProviderConfig> = {
[ConnectorProvider.OVHcloud]: {
tosLink: 'https://www.ovhcloud.com/en/terms-and-conditions/contracts/',
tokenLink: 'https://api.ovh.com/createToken/?GET=/order/cart&GET=/order/cart/*&POST=/order/cart&POST=/order/cart/*&DELETE=/order/cart/*&GET=/domain/extensions',
form: OvhCloudConnectorForm
},
[ConnectorProvider.Gandi]: {
tosLink: 'https://www.gandi.net/en/contracts/terms-of-service',
tokenLink: 'https://admin.gandi.net/organizations/account/pat',
form: GandiConnectorForm
},
[ConnectorProvider.Namecheap]: {
tosLink: 'https://www.namecheap.com/legal/universal/universal-tos/',
tokenLink: 'https://ap.www.namecheap.com/settings/tools/apiaccess/',
form: NamecheapConnectorForm
},
[ConnectorProvider.AutoDNS]: {
tosLink: 'https://www.internetx.com/agb/',
tokenLink: 'https://en.autodns.com/domain-robot-api/',
form: AutoDnsConnectorForm
},
[ConnectorProvider["Name.com"]]: {
tosLink: 'https://www.name.com/policies/',
tokenLink: 'https://www.name.com/account/settings/api',
form: NamecomConnectorForm
}
}