openapi: 3.1.0
info:
  title: Centre Pensées / MYT API (TENANT)
  version: 1.0.0
servers:
  - url: "https://api.centre-pensees.com/TENANT"   # e.g. /penseesberlin

components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

security:
  - ApiKeyAuth: []

paths:
  /emails:
    get:
      operationId: get_emails_or_email
      summary: Liste les emails ou retourne un email complet (selon uid)
      parameters:
        - name: account
          in: query
          required: true
          schema: { type: string }
        - name: uid
          in: query
          required: false
          schema: { type: integer }
        - name: unseen_only
          in: query
          required: false
          schema: { type: integer, enum: [0,1], default: 1 }
        - name: limit
          in: query
          required: false
          schema: { type: integer, default: 20, minimum: 1, maximum: 100 }
      responses:
        "200":
          description: Liste d'emails (si uid absent) OU email complet (si uid présent)

  /bookly/clients:
    get:
      operationId: get_clients
      summary: Liste des clients/patients
      responses:
        "200": { description: OK }

  /bookly/rendezvous:
    get:
      operationId: get_rendezvous
      summary: Liste des rendez-vous
      responses:
        "200": { description: OK }

  /bookly/therapeutes:
    get:
      operationId: get_therapeutes
      summary: Liste des thérapeutes
      responses:
        "200": { description: OK }

  /bookly/stats_rdv:
    get:
      operationId: get_rdv_stats
      summary: Stats RDV
      responses:
        "200": { description: OK }
