> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wethehivers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Changelog API

> Historique des changements de l'API THE HIVE

# Changelog API

Format inspiré de [Keep a Changelog](https://keepachangelog.com/). Versioning **semver** appliqué au préfixe d'URL (`/v1/api`, `/v2/api`...).

## Politique de versions

```mermaid theme={null}
flowchart LR
    CHG[Changement API] --> T{Type}
    T -->|Breaking| V2[Nouvelle version /v2/api]
    T -->|Ajout rétro-compatible| MIN[Minor - docs changelog]
    T -->|Bug fix| PAT[Patch - docs changelog]
    V2 --> PAR[v1 maintenu 6 mois en parallèle]
```

| Type         | Exemples                                                       | Déclenche                   |
| ------------ | -------------------------------------------------------------- | --------------------------- |
| **Breaking** | Supprimer un champ, changer un code HTTP, renommer un endpoint | `/v2/api`                   |
| **Minor**    | Nouvel endpoint, nouveau champ optionnel, nouveau filtre       | `v1` garde, ligne changelog |
| **Patch**    | Fix validation, fix perf, fix doc                              | `v1` garde, ligne changelog |

## Déprécation

```mermaid theme={null}
flowchart LR
    ANN[Annonce dépréciation] --> HEADER[Header Deprecation + Sunset]
    HEADER --> T1[T+90j warning logs]
    T1 --> T2[T+180j endpoint supprimé]
```

Headers renvoyés sur endpoint déprécié :

```http theme={null}
Deprecation: true
Sunset: Mon, 01 Jul 2026 00:00:00 GMT
Link: </v2/api/nouveau-path>; rel="successor-version"
```

## \[Unreleased]

### Ajouts

* Endpoints `/webhooks/*` (en design, voir [Webhooks](/dx/webhooks))
* Filtre `salaireMin` / `salaireMax` sur `/offres/search`

### Corrections

* (rien)

***

## \[2026.04.18] — Aujourd'hui

### Ajouts

* **Recherche full-text pondérée** sur offres (tsvector A/B/C/D)
  * Migration Flyway `V20260418093000__023_fulltext_search_vector.sql`
  * Endpoint `/offres/search?q=...` exploite le nouvel index GIN
* Champ `relevanceScore` dans `OffreSearchResult.content[]`

### Changements

* `POST /auth/refresh-token` : ajout de la **rotation systématique** du refresh token (invalide l'ancien)

```mermaid theme={null}
sequenceDiagram
    participant C as Client
    participant API as Backend
    C->>API: POST /auth/refresh-token {refreshToken: old}
    API->>API: Vérifier + blacklister old
    API-->>C: {accessToken, refreshToken: new}
    Note over C: Stocker new refresh
```

### Corrections

* Fix `candidat.profilPublic` : les endpoints publics respectent désormais strictement ce flag
* Fix pagination sur `/recruiters/me/offres` : `totalPages` incorrect si `size=0`

***

## \[2026.04.10]

### Ajouts

* Module **Vivier** complet : 15 endpoints `/recruiters/me/viviers/*`
* Import CSV de candidats externes dans un vivier
* Endpoint `POST /recruiters/me/viviers/{id}/invite`

### Changements

* `Entreprise.logoUrl` retourne maintenant un objet `{ url, variants: { 128, 256, 512 } }` au lieu d'une simple string

<Warning>
  Changement **rétrocompatible via Accept header**. Clients v1 continuent à recevoir la string. Clients demandant `Accept: application/vnd.hive.v2+json` reçoivent l'objet.
</Warning>

***

## \[2026.03.20]

### Ajouts

* Alertes email candidat : `/candidats/me/alertes/*`
* Cron quotidien 07:00 UTC+1 pour matching
* Unsubscribe one-click `GET /alertes/unsubscribe?token=...`

### Corrections

* Rate limiting : header `CF-Connecting-IP` désormais pris en compte en priorité (vrai IP client derrière Cloudflare)

```mermaid theme={null}
flowchart LR
    REQ[Request via CF] --> H{Headers}
    H --> CF[CF-Connecting-IP: vrai IP]
    H --> XFF[X-Forwarded-For: chain]
    CF --> RL[Rate limiter clé = vrai IP]
```

***

## \[2026.02.15]

### Ajouts

* Blog public : `/blog/*` (liste, détail, commentaires)
* Blog admin : `/admin/blog/*`
* Cover image avec variants responsive (600 / 1200 / 1920)

### Changements

* Migration R2 terminée : tous les médias servis depuis `cdn.wethehivers.com`
* MinIO décommissionné en prod

***

## \[2026.01.10]

### Ajouts

* KYC recruteur : upload RCCM PDF + validation admin
* États recruteur : `PENDING_DOCS` ajouté entre `PENDING_EMAIL` et `PENDING_APPROVAL`

```mermaid theme={null}
stateDiagram-v2
    [*] --> PENDING_EMAIL
    PENDING_EMAIL --> PENDING_DOCS: email validé
    PENDING_DOCS --> PENDING_APPROVAL: docs uploadés
    PENDING_APPROVAL --> ACTIVE: admin approuve
```

***

## \[2025.12.05]

### Ajouts

* Plans payants recruteur : `Gratuit`, `Essentiel`, `Pro`, `Entreprise`
* Quota d'offres publiées selon plan (1 / 5 / 20 / illimité)
* Intégration Stripe (test uniquement)

### Corrections

* Sécurité : CORS `allowedHeaders` restreint (plus de wildcard)

***

## \[2025.11.01]

### Ajouts

* Sous-rôles recruteur : `OWNER` et `MEMBER`
* Membres multiples par entreprise
* Transfert de propriété entreprise entre owners

***

## \[2025.10.01] — v1 stable

Première version stable de l'API publique. Endpoints principaux :

```mermaid theme={null}
flowchart TB
    V1[v1 stable] --> AUTH[/auth/*]
    V1 --> CAND[/candidats/*]
    V1 --> REC[/recruiters/*]
    V1 --> OFF[/offres/*]
    V1 --> APP[/candidatures/*]
    V1 --> ADM[/admin/*]
    V1 --> GEO[/regions, /villes]
```

***

## Roadmap

```mermaid theme={null}
timeline
    title Roadmap API THE HIVE
    Q2 2026 : Webhooks bêta, GraphQL explorer interne
    Q3 2026 : SDK officiels (?), OAuth2 pour intégrations tierces
    Q4 2026 : API v2 design review, analytics endpoints
    2027 : Mobile push notifications API
```

## Comment suivre les changements

```mermaid theme={null}
flowchart LR
    SRC[Source de vérité] --> CL[Cette page]
    SRC --> RSS[Flux RSS /changelog.rss]
    SRC --> EMAIL[Email intégrateurs]
    SRC --> DISCORD[Canal Discord #api-updates]
```

* **RSS** : `https://docs.wethehivers.com/changelog.rss`
* **Email** : s'inscrire sur `tech@wethehivers.com` avec sujet "subscribe changelog"
* **Discord** : invitation sur demande

## Voir aussi

* [Environnements](/environnements)
* [FAQ développeur](/dx/faq)
* [OpenAPI spec](/api-reference/openapi.json)
