{
  "openapi": "3.1.0",
  "info": {
    "title": "Djinn Export Hub",
    "description": "Exports comptables FEC/Sage/Pennylane et éléments variables paie",
    "version": "0.1.0"
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "description": "Health check endpoint.",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/formats": {
      "get": {
        "summary": "Formats",
        "description": "List all supported export formats.",
        "operationId": "formats_v1_formats_get",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FormatInfo"
                  },
                  "title": "Response Formats V1 Formats Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/export/fec": {
      "post": {
        "summary": "Export Fec",
        "description": "Generate a FEC file from journal entries.",
        "operationId": "export_fec_v1_export_fec_post",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FECExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/export/sage": {
      "post": {
        "summary": "Export Sage",
        "description": "Generate a Sage 100 export file.",
        "operationId": "export_sage_v1_export_sage_post",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SageExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/export/pennylane": {
      "post": {
        "summary": "Export Pennylane",
        "description": "Generate a Pennylane export file.",
        "operationId": "export_pennylane_v1_export_pennylane_post",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PennylaneExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/export/csv": {
      "post": {
        "summary": "Export Csv",
        "description": "Generate a generic CSV export.",
        "operationId": "export_csv_v1_export_csv_post",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CSVExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/export/payroll": {
      "post": {
        "summary": "Export Payroll",
        "description": "Generate a standardised payroll CSV export.",
        "operationId": "export_payroll_v1_export_payroll_post",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayrollEntryExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/export/payroll/silae": {
      "post": {
        "summary": "Export Silae",
        "description": "Generate Silae payroll variable elements export.",
        "operationId": "export_silae_v1_export_payroll_silae_post",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayrollExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/export/payroll/payfit": {
      "post": {
        "summary": "Export Payfit",
        "description": "Generate PayFit payroll variable elements export.",
        "operationId": "export_payfit_v1_export_payroll_payfit_post",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayrollExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/validate/fec": {
      "post": {
        "summary": "Validate Fec Endpoint",
        "description": "Validate an existing FEC file content.",
        "operationId": "validate_fec_endpoint_v1_validate_fec_post",
        "parameters": [
          {
            "name": "X-Internal-Service",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Internal-Service"
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Tenant-Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FECValidateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FECValidationResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CSVExportRequest": {
        "properties": {
          "data": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "maxItems": 100000,
            "minItems": 1,
            "title": "Data"
          },
          "delimiter": {
            "type": "string",
            "maxLength": 1,
            "title": "Delimiter",
            "default": ";"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "CSVExportRequest",
        "description": "Requête d'export CSV générique."
      },
      "FECExportRequest": {
        "properties": {
          "siren": {
            "type": "string",
            "maxLength": 9,
            "minLength": 9,
            "pattern": "^\\d{9}$",
            "title": "Siren",
            "description": "SIREN (9 chiffres)"
          },
          "fiscal_year_start": {
            "type": "string",
            "format": "date",
            "title": "Fiscal Year Start",
            "description": "Début exercice fiscal"
          },
          "fiscal_year_end": {
            "type": "string",
            "format": "date",
            "title": "Fiscal Year End",
            "description": "Fin exercice fiscal"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/FECLine"
            },
            "type": "array",
            "minItems": 1,
            "title": "Entries"
          }
        },
        "type": "object",
        "required": [
          "siren",
          "fiscal_year_start",
          "fiscal_year_end",
          "entries"
        ],
        "title": "FECExportRequest",
        "description": "Requête d'export FEC."
      },
      "FECLine": {
        "properties": {
          "journal_code": {
            "type": "string",
            "title": "Journal Code"
          },
          "journal_lib": {
            "type": "string",
            "title": "Journal Lib"
          },
          "ecriture_num": {
            "type": "string",
            "title": "Ecriture Num"
          },
          "ecriture_date": {
            "type": "string",
            "format": "date",
            "title": "Ecriture Date"
          },
          "compte_num": {
            "type": "string",
            "title": "Compte Num"
          },
          "compte_lib": {
            "type": "string",
            "title": "Compte Lib"
          },
          "comp_aux_num": {
            "type": "string",
            "title": "Comp Aux Num",
            "default": ""
          },
          "comp_aux_lib": {
            "type": "string",
            "title": "Comp Aux Lib",
            "default": ""
          },
          "piece_ref": {
            "type": "string",
            "title": "Piece Ref"
          },
          "piece_date": {
            "type": "string",
            "format": "date",
            "title": "Piece Date"
          },
          "ecriture_lib": {
            "type": "string",
            "title": "Ecriture Lib"
          },
          "debit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Debit",
            "default": "0.00"
          },
          "credit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Credit",
            "default": "0.00"
          },
          "ecriture_let": {
            "type": "string",
            "title": "Ecriture Let",
            "default": ""
          },
          "date_let": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Let"
          },
          "valid_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid Date"
          },
          "montant_devise": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Montant Devise"
          },
          "idevise": {
            "type": "string",
            "title": "Idevise",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "journal_code",
          "journal_lib",
          "ecriture_num",
          "ecriture_date",
          "compte_num",
          "compte_lib",
          "piece_ref",
          "piece_date",
          "ecriture_lib"
        ],
        "title": "FECLine",
        "description": "Ligne FEC conforme à la norme DGFiP (18 colonnes obligatoires)."
      },
      "FECValidateRequest": {
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1,
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "FECValidateRequest",
        "description": "Requête de validation FEC."
      },
      "FECValidationResult": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid",
            "default": true
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Errors"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings"
          },
          "line_count": {
            "type": "integer",
            "title": "Line Count",
            "default": 0
          },
          "total_debit": {
            "type": "number",
            "title": "Total Debit",
            "default": 0.0
          },
          "total_credit": {
            "type": "number",
            "title": "Total Credit",
            "default": 0.0
          },
          "balance_ok": {
            "type": "boolean",
            "title": "Balance Ok",
            "default": true
          }
        },
        "type": "object",
        "title": "FECValidationResult",
        "description": "Résultat de validation FEC."
      },
      "FormatInfo": {
        "properties": {
          "format": {
            "type": "string",
            "title": "Format"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "category": {
            "type": "string",
            "title": "Category"
          }
        },
        "type": "object",
        "required": [
          "format",
          "description",
          "category"
        ],
        "title": "FormatInfo",
        "description": "Description d'un format d'export."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "ok"
          },
          "service": {
            "type": "string",
            "title": "Service",
            "default": "export-hub"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "default": "0.1.0"
          }
        },
        "type": "object",
        "title": "HealthResponse",
        "description": "Response for the health check endpoint."
      },
      "JournalEntry": {
        "properties": {
          "journal_code": {
            "type": "string",
            "title": "Journal Code",
            "description": "Code journal (VE, HA, BQ, OD, ...)"
          },
          "journal_label": {
            "type": "string",
            "title": "Journal Label",
            "description": "Libellé du journal"
          },
          "entry_number": {
            "type": "string",
            "title": "Entry Number",
            "description": "Numéro d'écriture"
          },
          "entry_date": {
            "type": "string",
            "format": "date",
            "title": "Entry Date",
            "description": "Date de l'écriture"
          },
          "account_number": {
            "type": "string",
            "title": "Account Number",
            "description": "Numéro de compte (PCG)"
          },
          "account_label": {
            "type": "string",
            "title": "Account Label",
            "description": "Libellé du compte"
          },
          "aux_account": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aux Account",
            "description": "Compte auxiliaire"
          },
          "aux_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aux Label",
            "description": "Libellé auxiliaire"
          },
          "piece_ref": {
            "type": "string",
            "title": "Piece Ref",
            "description": "Référence de la pièce"
          },
          "piece_date": {
            "type": "string",
            "format": "date",
            "title": "Piece Date",
            "description": "Date de la pièce"
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Libellé de l'écriture"
          },
          "debit": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Debit",
            "default": "0.00"
          },
          "credit": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Credit",
            "default": "0.00"
          },
          "lettrage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lettrage",
            "description": "Code de lettrage"
          },
          "lettrage_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lettrage Date"
          },
          "validation_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Validation Date"
          },
          "currency_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency Amount"
          },
          "currency_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency Code",
            "description": "ISO 4217"
          }
        },
        "type": "object",
        "required": [
          "journal_code",
          "journal_label",
          "entry_number",
          "entry_date",
          "account_number",
          "account_label",
          "piece_ref",
          "piece_date",
          "label"
        ],
        "title": "JournalEntry",
        "description": "Écriture comptable générique."
      },
      "PayrollEntry": {
        "properties": {
          "employee_id": {
            "type": "string",
            "title": "Employee Id",
            "description": "Identifiant salarié"
          },
          "period": {
            "type": "string",
            "pattern": "^\\d{4}-(?:0[1-9]|1[0-2])$",
            "title": "Period",
            "description": "Periode YYYY-MM"
          },
          "gross_salary": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Gross Salary",
            "description": "Salaire brut"
          },
          "net_salary": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Net Salary",
            "description": "Salaire net"
          },
          "employer_charges": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Employer Charges",
            "description": "Charges patronales"
          },
          "employee_charges": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Employee Charges",
            "description": "Charges salariales"
          }
        },
        "type": "object",
        "required": [
          "employee_id",
          "period",
          "gross_salary",
          "net_salary",
          "employer_charges",
          "employee_charges"
        ],
        "title": "PayrollEntry",
        "description": "Entrée de paie pour export standardisé."
      },
      "PayrollEntryExportRequest": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PayrollEntry"
            },
            "type": "array",
            "minItems": 1,
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "PayrollEntryExportRequest",
        "description": "Requête d'export paie standardisé."
      },
      "PayrollExportRequest": {
        "properties": {
          "variables": {
            "items": {
              "$ref": "#/components/schemas/PayrollVariable"
            },
            "type": "array",
            "minItems": 1,
            "title": "Variables"
          }
        },
        "type": "object",
        "required": [
          "variables"
        ],
        "title": "PayrollExportRequest",
        "description": "Requête d'export éléments variables paie (Silae/PayFit)."
      },
      "PayrollVariable": {
        "properties": {
          "employee_id": {
            "type": "string",
            "title": "Employee Id",
            "description": "Identifiant salarié"
          },
          "employee_name": {
            "type": "string",
            "title": "Employee Name",
            "description": "Nom complet"
          },
          "period": {
            "type": "string",
            "pattern": "^\\d{4}-(?:0[1-9]|1[0-2])$",
            "title": "Period",
            "description": "Periode YYYY-MM"
          },
          "code": {
            "type": "string",
            "title": "Code",
            "description": "Code rubrique paie"
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Libellé de l'élément"
          },
          "quantity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Quantity",
            "description": "Quantité (jours, heures)",
            "default": "0.00"
          },
          "rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Rate",
            "description": "Taux (TJM, taux horaire)",
            "default": "0.00"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Amount",
            "description": "Montant calculé",
            "default": "0.00"
          },
          "unit": {
            "type": "string",
            "title": "Unit",
            "description": "Unité (jours, heures, forfait)",
            "default": "jours"
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          }
        },
        "type": "object",
        "required": [
          "employee_id",
          "employee_name",
          "period",
          "code",
          "label"
        ],
        "title": "PayrollVariable",
        "description": "Élément variable de paie (pour export Silae/PayFit)."
      },
      "PennylaneExportRequest": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/JournalEntry"
            },
            "type": "array",
            "minItems": 1,
            "title": "Entries"
          }
        },
        "type": "object",
        "required": [
          "entries"
        ],
        "title": "PennylaneExportRequest",
        "description": "Requête d'export Pennylane."
      },
      "SageExportRequest": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/JournalEntry"
            },
            "type": "array",
            "minItems": 1,
            "title": "Entries"
          }
        },
        "type": "object",
        "required": [
          "entries"
        ],
        "title": "SageExportRequest",
        "description": "Requête d'export Sage 100."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  }
}
