feat: gestion NDD avec auto-détection OVH/Cloudflare + service OvhService

OvhService (ovh/ovh SDK) :
- listDomains() : liste tous les NDD du compte OVH
- isDomainManaged(fqdn) : vérifie si un domaine est chez OVH
- getDomainInfo(fqdn) : infos domaine (nameServerType, offer, etc.)
- getDomainServiceInfo(fqdn) : expiration, création, status, contacts
- getZoneInfo(fqdn) : zone DNS (OVH ou externe, DNSSEC)

Ajout NDD (onglet Noms de domaine, fiche client) :
- Formulaire : nom de domaine + registrar (auto-détection ou manuel)
- autoDetectDomain() au submit :
  1. Check OVH : si trouvé → registrar=OVH, isGestion=true, isBilling=true,
     expiredAt depuis serviceInfos, check zone DNS OVH
  2. Check Cloudflare : si zone trouvée → zoneCloudflare=active,
     zoneIdCloudflare=zoneId. Si registrar=Cloudflare → gestion+billing actifs
  3. Si ni OVH ni CF : registrar manuel (Gandi/Autre), isGestion=false
- Suppression NDD avec data-confirm modal
- Colonne Actions ajoutée dans la table

Configuration :
- .env : OVH_KEY, OVH_SECRET, OVH_CUSTOMER
- .env.local : credentials OVH
- ansible/vault.yml : credentials OVH pour prod
- composer.json : ovh/ovh ^3.5

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-04-04 19:18:05 +02:00
parent 9fa0b1b629
commit bd71f8fcc2
7 changed files with 316 additions and 2 deletions

6
.env
View File

@@ -120,3 +120,9 @@ DISCORD_WEBHOOK=
###> esymail ###
ESYMAIL_DATABASE_URL=
###< esymail ###
###> ovh ###
OVH_KEY=
OVH_SECRET=
OVH_CUSTOMER=
###< ovh ###