{ "openapi": "3.1.0", "info": { "title": "API Projet EIR", "description": "API du Registre d'Identité des Équipements (EIR) pour la gestion professionnelle d'appareils mobiles", "termsOfService": "https://eir-project.com/terms", "contact": { "name": "Équipe de Développement EIR", "url": "https://eir-project.com/", "email": "contact@eir-project.com" }, "license": { "name": "Licence Propriétaire", "url": "https://eir-project.com/license" }, "version": "1.0.0" }, "paths": { "/authentification/inscription": { "post": { "tags": [ "Authentification", "Authentification" ], "summary": "Register", "operationId": "register_authentification_inscription_post", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreationUtilisateur" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/authentification/verify-email": { "get": { "tags": [ "Authentification", "Authentification" ], "summary": "Verify Email", "operationId": "verify_email_authentification_verify_email_get", "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/authentification/resend-verification-email": { "post": { "tags": [ "Authentification", "Authentification" ], "summary": "Resend Verification Email", "operationId": "resend_verification_email_authentification_resend_verification_email_post", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/authentification/connexion": { "post": { "tags": [ "Authentification", "Authentification" ], "summary": "Login", "description": "Connexion utilisateur", "operationId": "login_authentification_connexion_post", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnexionUtilisateur" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Jeton" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/authentification/profile": { "get": { "tags": [ "Authentification", "Authentification" ], "summary": "Get Profile Detailed", "description": "Récupérer le profil utilisateur détaillé pour le frontend", "operationId": "get_profile_detailed_authentification_profile_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfilUtilisateurDetaille" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/authentification/profile/simple": { "get": { "tags": [ "Authentification", "Authentification" ], "summary": "Get Profile Simple", "description": "Récupérer le profil utilisateur (version simple)\n\nVersion allégée qui retourne uniquement les informations de base.\nUtile pour les applications qui n'ont besoin que des données essentielles.\n\nArgs:\n current_user: Utilisateur authentifié (injecté automatiquement)\n\nReturns:\n ReponseUtilisateur: Informations de base du profil utilisateur", "operationId": "get_profile_simple_authentification_profile_simple_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReponseUtilisateur" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/authentification/deconnexion": { "post": { "tags": [ "Authentification", "Authentification" ], "summary": "Logout", "description": "Déconnexion utilisateur\n\nDéconnecte l'utilisateur actuellement connecté et enregistre l'action\ndans le journal d'audit à des fins de traçabilité et de sécurité.\n\nNote: Dans une implémentation JWT stateless, cette fonction sert principalement\nà l'audit. Pour une sécurité renforcée, considérez l'implémentation d'une\nliste noire de tokens (token blacklist).\n\nArgs:\n current_user: Utilisateur authentifié (injecté automatiquement)\n db: Session de base de données\n\nReturns:\n dict: Message de confirmation de déconnexion\n\nRaises:\n HTTPException: Si le token est invalide (401) ou erreur serveur (500)", "operationId": "logout_authentification_deconnexion_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/authentification/mot-de-passe-oublie": { "post": { "tags": [ "Authentification", "Authentification" ], "summary": "Demander Reset Password", "description": "Demander une réinitialisation de mot de passe\n\nGénère un token de réinitialisation et envoie un code de vérification \npar email ou SMS selon la méthode choisie.\n\n### Support Multilingue:\n- Utilisez l'en-tête `Accept-Language` pour recevoir les messages dans votre langue\n- Langues supportées: `fr` (français), `en` (anglais), `ar` (arabe)\n\n### Méthodes de vérification:\n- **EMAIL**: Code envoyé par email (par défaut)\n- **SMS**: Code envoyé par SMS (nécessite numéro de téléphone)\n\n### Sécurité:\n- Token valide pour 1 heure\n- Code de vérification à 6 chiffres\n- Journalisation des tentatives", "operationId": "demander_reset_password_authentification_mot_de_passe_oublie_post", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemandeResetPassword" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReponseResetPassword" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/authentification/verifier-code-reset": { "post": { "tags": [ "Authentification", "Authentification" ], "summary": "Verifier Code Reset", "description": "Vérifier le code de réinitialisation\n\nValide le code de vérification reçu par email ou SMS.\nUne fois validé, le token peut être utilisé pour changer le mot de passe.\n\n### Paramètres:\n- **token**: Token de reset reçu\n- **code_verification**: Code à 6 chiffres reçu par email/SMS\n\n### Retour:\n- Token validé pour procéder au changement de mot de passe", "operationId": "verifier_code_reset_authentification_verifier_code_reset_post", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerificationCodeReset" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReponseResetPassword" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/authentification/nouveau-mot-de-passe": { "post": { "tags": [ "Authentification", "Authentification" ], "summary": "Changer Mot De Passe", "description": "Définir un nouveau mot de passe\n\nChange le mot de passe de l'utilisateur avec un token validé.\n\n### Paramètres:\n- **token**: Token validé lors de la vérification du code\n- **nouveau_mot_de_passe**: Nouveau mot de passe (minimum 8 caractères)\n- **confirmer_mot_de_passe**: Confirmation du nouveau mot de passe\n\n### Sécurité:\n- Le token devient inutilisable après usage\n- Journalisation complète de l'opération\n- Notification de sécurité envoyée", "operationId": "changer_mot_de_passe_authentification_nouveau_mot_de_passe_post", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NouveauMotDePasse" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReponseResetPassword" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/gestion-acces/niveaux-acces": { "get": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Obtenir Niveaux Acces", "description": "Obtenir tous les niveaux d'accès disponibles et leurs permissions par défaut", "operationId": "obtenir_niveaux_acces_admin_gestion_acces_niveaux_acces_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/InfoNiveauAcces" }, "type": "array", "title": "Response Obtenir Niveaux Acces Admin Gestion Acces Niveaux Acces Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/gestion-acces/utilisateurs": { "get": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Lister Utilisateurs Avec Permissions", "description": "Lister tous les utilisateurs avec leurs résumés de permissions", "operationId": "lister_utilisateurs_avec_permissions_admin_gestion_acces_utilisateurs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "ignorer", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Ignorer" } }, { "name": "limite", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limite" } }, { "name": "filtre_niveau_acces", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Filtre Niveau Acces" } }, { "name": "filtre_organisation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Filtre Organisation" } }, { "name": "actifs_seulement", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Actifs Seulement" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ResumePermissionUtilisateur" }, "title": "Response Lister Utilisateurs Avec Permissions Admin Gestion Acces Utilisateurs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/gestion-acces/utilisateurs/{id_utilisateur}/permissions": { "get": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Obtenir Permissions Utilisateur", "description": "Obtenir les permissions détaillées pour un utilisateur spécifique", "operationId": "obtenir_permissions_utilisateur_admin_gestion_acces_utilisateurs__id_utilisateur__permissions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "id_utilisateur", "in": "path", "required": true, "schema": { "type": "string", "title": "Id Utilisateur" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Mettre A Jour Permissions Utilisateur", "description": "Mettre à jour les permissions et niveaux d'accès utilisateur", "operationId": "mettre_a_jour_permissions_utilisateur_admin_gestion_acces_utilisateurs__id_utilisateur__permissions_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "id_utilisateur", "in": "path", "required": true, "schema": { "type": "string", "title": "Id Utilisateur" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MiseAJourPermission" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/gestion-acces/utilisateurs/{id_utilisateur}/regles-acces": { "post": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Ajouter Regle Acces", "description": "Ajouter une règle d'accès spécifique pour les parties concernées", "operationId": "ajouter_regle_acces_admin_gestion_acces_utilisateurs__id_utilisateur__regles_acces_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "id_utilisateur", "in": "path", "required": true, "schema": { "type": "string", "title": "Id Utilisateur" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Donnees Regle" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/gestion-acces/utilisateurs/{id_utilisateur}/regles-acces/{index_regle}": { "delete": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Supprimer Regle Acces", "description": "Remove specific access rule", "operationId": "supprimer_regle_acces_admin_gestion_acces_utilisateurs__id_utilisateur__regles_acces__index_regle__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "id_utilisateur", "in": "path", "required": true, "schema": { "type": "string", "title": "Id Utilisateur" } }, { "name": "index_regle", "in": "path", "required": true, "schema": { "type": "integer", "title": "Index Regle" } }, { "name": "type_regle", "in": "query", "required": true, "schema": { "type": "string", "title": "Type Regle" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/gestion-acces/audit/changements-permissions": { "get": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Obtenir Journal Audit Permissions", "description": "Get audit log of permission changes", "operationId": "obtenir_journal_audit_permissions_admin_gestion_acces_audit_changements_permissions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, { "name": "admin_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Admin Id" } }, { "name": "days", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 365, "minimum": 1, "default": 30, "title": "Days" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/gestion-acces/mise-a-jour-lot-permissions": { "post": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Mettre A Jour Permissions Lot", "description": "Bulk update permissions for multiple users", "operationId": "mettre_a_jour_permissions_lot_admin_gestion_acces_mise_a_jour_lot_permissions_post", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "title": "Update Data" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/gestion-acces/modeles": { "get": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Obtenir Modeles Permissions", "description": "Get predefined permission templates for common use cases", "operationId": "obtenir_modeles_permissions_admin_gestion_acces_modeles_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/gestion-acces/appliquer-modele/{nom_modele}/{id_utilisateur}": { "post": { "tags": [ "Gestion d'Accès", "Gestion d'Accès" ], "summary": "Appliquer Modele Permissions", "description": "Apply a permission template to a user", "operationId": "appliquer_modele_permissions_admin_gestion_acces_appliquer_modele__nom_modele___id_utilisateur__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "nom_modele", "in": "path", "required": true, "schema": { "type": "string", "title": "Nom Modele" } }, { "name": "id_utilisateur", "in": "path", "required": true, "schema": { "type": "string", "title": "Id Utilisateur" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Config Supplementaire" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/notifications/": { "get": { "tags": [ "Notifications", "Notifications" ], "summary": "Test Notifications", "description": "Test endpoint pour vérifier que le router fonctionne", "operationId": "test_notifications_notifications__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Response Test Notifications Notifications Get" } } } } } } }, "/notifications/statistiques/globales": { "get": { "tags": [ "Notifications", "Notifications" ], "summary": "Obtenir Statistiques Notifications", "description": "Obtient les statistiques des notifications pour l'utilisateur connecté", "operationId": "obtenir_statistiques_notifications_notifications_statistiques_globales_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatistiquesNotifications" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/notifications/admin/envoyer-a-utilisateur": { "post": { "tags": [ "Notifications", "Notifications" ], "summary": "Admin Envoyer Notification Utilisateur", "description": "Permet à un administrateur d'envoyer une notification à un utilisateur spécifique via son email\n\n**Réservé aux administrateurs**\n**Pratique: Utilisez l'email de l'utilisateur au lieu de son ID**", "operationId": "admin_envoyer_notification_utilisateur_notifications_admin_envoyer_a_utilisateur_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnvoiNotificationAdmin" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReponseEnvoiImmediat" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/notifications/admin/envoyer-lot-utilisateurs": { "post": { "tags": [ "Notifications", "Notifications" ], "summary": "Admin Envoyer Notifications Lot", "description": "Permet à un administrateur d'envoyer des notifications en lot à plusieurs utilisateurs\n\n**Réservé aux administrateurs**", "operationId": "admin_envoyer_notifications_lot_notifications_admin_envoyer_lot_utilisateurs_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnvoiNotificationLotAdmin" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReponseEnvoiLotAdmin" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/notifications/admin/envoyer-lot-emails": { "post": { "tags": [ "Notifications", "Notifications" ], "summary": "Admin Envoyer Notifications Lot Par Emails", "description": "Permet à un administrateur d'envoyer des notifications en lot en utilisant les adresses email\n\n**Réservé aux administrateurs**\n**Pratique: Utilisez les emails directement au lieu des UUIDs**", "operationId": "admin_envoyer_notifications_lot_par_emails_notifications_admin_envoyer_lot_emails_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnvoiNotificationLotAdminParEmail" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReponseEnvoiLotAdmin" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/notifications/admin/liste-utilisateurs": { "get": { "tags": [ "Notifications", "Notifications" ], "summary": "Admin Lister Utilisateurs Pour Notifications", "description": "Liste les utilisateurs disponibles pour l'envoi de notifications administratives\n\n**Réservé aux administrateurs**", "operationId": "admin_lister_utilisateurs_pour_notifications_notifications_admin_liste_utilisateurs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "actifs_seulement", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Lister seulement les utilisateurs actifs", "default": true, "title": "Actifs Seulement" }, "description": "Lister seulement les utilisateurs actifs" }, { "name": "avec_email", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Lister seulement les utilisateurs avec email", "default": true, "title": "Avec Email" }, "description": "Lister seulement les utilisateurs avec email" }, { "name": "recherche", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Rechercher par nom ou email", "title": "Recherche" }, "description": "Rechercher par nom ou email" }, { "name": "limite", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "description": "Limite du nombre de résultats", "default": 50, "title": "Limite" }, "description": "Limite du nombre de résultats" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" }, "title": "Response Admin Lister Utilisateurs Pour Notifications Notifications Admin Liste Utilisateurs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/notifications/admin/test-email": { "post": { "tags": [ "Notifications", "Notifications" ], "summary": "Admin Test Email", "description": "Teste l'envoi d'email pour les administrateurs\n\n**Réservé aux administrateurs**", "operationId": "admin_test_email_notifications_admin_test_email_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "email_test", "in": "query", "required": true, "schema": { "type": "string", "description": "Adresse email de test", "title": "Email Test" }, "description": "Adresse email de test" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Admin Test Email Notifications Admin Test Email Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/notifications/admin/test-sms": { "post": { "tags": [ "Notifications", "Notifications" ], "summary": "Admin Test Sms", "description": "Teste l'envoi de SMS pour les administrateurs\n\n**Réservé aux administrateurs**", "operationId": "admin_test_sms_notifications_admin_test_sms_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "numero_test", "in": "query", "required": true, "schema": { "type": "string", "description": "Numéro de téléphone de test", "title": "Numero Test" }, "description": "Numéro de téléphone de test" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Admin Test Sms Notifications Admin Test Sms Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/import/aide": { "get": { "tags": [ "Import", "Import" ], "summary": "Guide d'utilisation", "description": "Comment utiliser les endpoints d'import simplement", "operationId": "guide_utilisation_import_aide_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/import/templates": { "get": { "tags": [ "Import", "Import" ], "summary": "Templates de mapping", "description": "Obtenir les templates de mapping prédéfinis pour faciliter l'import de fichiers.", "operationId": "get_mapping_templates_import_templates_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filtrer par catégorie de système", "title": "Category" }, "description": "Filtrer par catégorie de système" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AvailableTemplatesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/import/preview": { "post": { "tags": [ "Import", "Import" ], "summary": "Prévisualiser un fichier", "description": "Analyser un fichier CSV ou JSON avant l'import pour vérifier la structure et détecter les erreurs.", "operationId": "preview_import_import_preview_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportPreviewRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportPreviewResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/import/validate-mapping": { "post": { "tags": [ "Import", "Import" ], "summary": "Valider le Mapping de Colonnes", "description": "## Validation de Mapping de Colonnes\n \n Valider un mapping de colonnes proposé avant l'import :\n \n ### Validations Effectuées :\n - **Champs obligatoires** : Vérification que marque et modèle sont mappés\n - **Cohérence** : Validation que les colonnes existent dans le fichier\n - **Suggestions** : Propositions alternatives pour les champs non mappés\n - **Optimisation** : Détection de mappings potentiellement meilleurs\n \n ### Retour :\n - **is_valid** : True si le mapping est valide\n - **missing_required_fields** : Champs obligatoires manquants\n - **suggestions** : Améliorations suggérées\n - **validated_mapping** : Mapping validé et optimisé\n \n Accessible à tous les utilisateurs authentifiés.", "operationId": "validate_mapping_import_validate_mapping_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MappingValidationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MappingValidationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/import/csv": { "post": { "tags": [ "Import", "Import" ], "summary": "Importer un fichier CSV", "description": "Importer des appareils et IMEI depuis un fichier CSV. Format attendu : marque,modele,imei1,imei2,statut (active/suspect/bloque). Les numéros de série (SNR) sont extraits automatiquement des IMEI (positions 9-14).", "operationId": "import_csv_import_csv_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_import_csv_import_csv_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/import/json": { "post": { "tags": [ "Import", "Import" ], "summary": "Importer un fichier JSON", "description": "Importer des appareils et IMEI depuis un fichier JSON. Les numéros de série (SNR) sont extraits automatiquement des IMEI (positions 9-14).", "operationId": "import_json_import_json_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_import_json_import_json_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/import/upload": { "post": { "tags": [ "Import", "Import" ], "summary": "Uploader et importer un fichier", "description": "Uploader un fichier CSV ou JSON depuis votre appareil et l'importer directement. Les numéros de série (SNR) sont extraits automatiquement des IMEI.", "operationId": "import_file_upload_import_upload_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_import_file_upload_import_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/import/simple-upload": { "post": { "tags": [ "Import", "Import" ], "summary": "Upload simple de fichier", "description": "Uploader simplement un fichier CSV ou JSON et l'importer. Extraction automatique des numéros de série depuis les IMEI. Idéal pour utilisation mobile.", "operationId": "simple_file_upload_import_simple_upload_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_simple_file_upload_import_simple_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/": { "get": { "tags": [ "Système" ], "summary": "Bienvenue API", "description": "Obtenir des informations complètes sur l'API, les capacités et le guide de démarrage rapide", "operationId": "bienvenue__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health": { "get": { "tags": [ "Système" ], "summary": "Vérification d'État", "description": "Informations complètes sur l'état et le statut du système", "operationId": "health_check_health_get", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/verification-etat": { "get": { "tags": [ "Système" ], "summary": "Vérification d'État (Francisé)", "description": "Informations complètes sur l'état et le statut du système", "operationId": "verification_etat_verification_etat_get", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/languages": { "get": { "tags": [ "Système" ], "summary": "Langues Supportées", "description": "## Langues Supportées\n\nObtenir des informations sur toutes les langues supportées incluant :\n- Codes et noms des langues\n- Noms natifs des langues\n- Support RTL (Droite-vers-Gauche)\n- Paramètres de langue par défaut", "operationId": "obtenir_langues_supportees_languages_get", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/public/statistiques": { "get": { "tags": [ "Public", "Analyses" ], "summary": "Statistiques Publiques", "description": "Obtenir les statistiques publiques du système sans authentification", "operationId": "statistiques_publiques_public_statistiques_get", "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/imei/{imei}": { "get": { "tags": [ "IMEI", "Public" ], "summary": "Recherche IMEI Améliorée avec Contrôle d'Accès", "description": "Rechercher les informations IMEI avec niveaux d'accès granulaires et journalisation automatique des recherches", "operationId": "verifier_imei_imei__imei__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "imei", "in": "path", "required": true, "schema": { "type": "string", "title": "Imei" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/appareils": { "post": { "tags": [ "Appareils" ], "summary": "Enregistrer Appareil", "description": "Enregistrer un appareil avec contrôle d'accès amélioré et journalisation d'audit\n\n### Contrôle d'Accès:\n- Les utilisateurs standard peuvent enregistrer des appareils pour eux-mêmes\n- Les utilisateurs élevés peuvent enregistrer des appareils dans leur organisation\n- Les admins peuvent enregistrer des appareils pour tout utilisateur\n- Les utilisateurs limités (parties concernées) ont un accès restreint basé sur les marques\n\n### Extraction Automatique du Numéro de Série:\n- Les numéros de série (SNR) sont extraits automatiquement des IMEI (positions 9-14)\n- Chaque IMEI valide génère un SNR unique pour identification des appareils\n- Le SNR est stocké dans la colonne numero_serie de la table appareil\n\n### Support Multilingue:\n- Utilisez l'en-tête `Accept-Language` pour spécifier la langue préférée\n- Langues supportées: `fr` (français), `en` (anglais), `ar` (arabe)\n- Exemple: `Accept-Language: en-US,en;q=0.9,fr;q=0.8`\n- Alternative: utilisez l'en-tête `X-Language` ou le paramètre `?lang=`\n\n### Messages d'Erreur Localisés:\n- Les messages d'erreur sont retournés dans la langue demandée\n- Les erreurs de validation IMEI dupliqué sont traduites automatiquement", "operationId": "enregistrer_appareil_appareils_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Donnees Appareil" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Appareils" ], "summary": "Liste des appareils", "description": "Répertorier les appareils avec un contrôle d'accès et un filtrage améliorés\n\n### Contrôle d'accès :\n- Les utilisateurs voient les appareils en fonction de leur périmètre de données\n- Le filtrage par marque respecte les marques autorisées pour les parties concernées\n- Filtrage organisationnel pour les utilisateurs privilégiés\n- Accès complet pour les administrateurs\n\n### Informations des Appareils :\n- Inclut les numéros de série extraits automatiquement des IMEI\n- Affiche les détails complets selon le niveau d'accès\n- Identifie de manière unique chaque appareil via son SNR", "operationId": "list_devices_appareils_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } }, { "name": "marque", "in": "query", "required": false, "schema": { "type": "string", "title": "Marque" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/recherches": { "get": { "tags": [ "Historique de Recherche" ], "summary": "List Searches", "description": "Lister les recherches avec contrôle d'accès et filtrage par IMEI.", "operationId": "list_searches_recherches_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 10, "title": "Limit" } }, { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Q" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/mes-permissions": { "get": { "tags": [ "Utilisateurs" ], "summary": "Get My Permissions", "description": "Obtenir les permissions et niveaux d'accès de l'utilisateur actuel\n\n### Retourne:\n- Niveau d'accès actuel et permissions\n- Marques autorisées et plages IMEI\n- Périmètre de données et restrictions\n- Opérations disponibles", "operationId": "get_my_permissions_mes_permissions_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/utilisateurs": { "post": { "tags": [ "Utilisateurs", "Admin" ], "summary": "Create User", "description": "Admin seulement - créer un nouvel utilisateur avec journalisation d'audit", "operationId": "create_user_utilisateurs_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "User Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/utilisateurs/{user_id}": { "get": { "summary": "Get User", "description": "Obtenir les détails utilisateur - les utilisateurs ne peuvent voir que leurs propres données, les admins voient tout", "operationId": "get_user_utilisateurs__user_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/cartes-sim": { "post": { "tags": [ "Cartes SIM" ], "summary": "Register Sim", "description": "Enregistrer une nouvelle carte SIM - utilisateurs authentifiés seulement", "operationId": "register_sim_cartes_sim_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Sim Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/cartes-sim/{iccid}": { "get": { "tags": [ "Cartes SIM" ], "summary": "Check Iccid", "operationId": "check_iccid_cartes_sim__iccid__get", "parameters": [ { "name": "iccid", "in": "path", "required": true, "schema": { "type": "string", "title": "Iccid" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/appareils/{device_id}/assigner": { "put": { "tags": [ "Appareils", "Admin" ], "summary": "Assign Device To User", "description": "Admin only - assign device to user with audit logging", "operationId": "assign_device_to_user_appareils__device_id__assigner_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "device_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Device Id" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Assignment Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/appareils/{device_id}": { "delete": { "tags": [ "Admin" ], "summary": "Delete Device", "description": "Supprimer un appareil avec journalisation d'audit - Administrateurs uniquement.", "operationId": "delete_device_admin_appareils__device_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "appareil_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Appareil Id" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/import-lot-appareils": { "post": { "tags": [ "Appareils", "Admin" ], "summary": "Bulk Import Devices", "description": "Import en lot d'appareils avec journalisation d'audit - Administrateurs uniquement.\nFormat JSON simple pour les données structurées.\n\n### Extraction Automatique du Numéro de Série:\n- Les numéros de série (SNR) sont extraits automatiquement des IMEI lors de l'import\n- Chaque appareil obtient un SNR unique basé sur l'IMEI principal\n- Le SNR permet l'identification unique au-delà de la marque/modèle", "operationId": "bulk_import_devices_admin_import_lot_appareils_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" }, "title": "Devices Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/import-file": { "post": { "tags": [ "Appareils", "Admin" ], "summary": "Bulk Import From File", "description": "Import en lot d'appareils depuis un fichier JSON ou CSV avec mappage de colonnes.\n\n### Formats Supportés:\n- **JSON**: Fichier JSON contenant un tableau d'objets\n- **CSV**: Fichier CSV avec headers\n\n### Extraction Automatique du Numéro de Série:\n- Les numéros de série (SNR) sont extraits automatiquement des IMEI (positions 9-14)\n- Chaque IMEI valide génère un SNR unique stocké dans numero_serie\n- Améliore l'identification des appareils au-delà de marque/modèle\n\n### Mappage de Colonnes:\nLe paramètre column_mapping permet de mapper les noms de colonnes du fichier\nvers les champs de la base de données. Format JSON:\n\n```json\n{\n \"brand_name\": \"marque\",\n \"device_model\": \"modele\", \n \"memory\": \"emmc\",\n \"imei_1\": \"imei1\",\n \"imei_2\": \"imei2\",\n \"owner_id\": \"utilisateur_id\"\n}\n```\n\n### Champs de Base de Données:\n- **marque**: Marque de l'appareil (requis)\n- **modele**: Modèle de l'appareil (requis)\n- **emmc**: Capacité de stockage\n- **utilisateur_id**: ID du propriétaire (UUID)\n- **imei1**: Premier IMEI (SNR extrait automatiquement)\n- **imei2**: Deuxième IMEI (optionnel)\n- **numero_serie**: Extrait automatiquement de l'IMEI principal\n\n### Exemple de fichier CSV:\n```\nbrand_name,device_model,memory,imei_1,imei_2,owner_id\nSamsung,Galaxy S21,128GB,353260051234567,353260051234568,uuid-here\nApple,iPhone 13,256GB,356920051789012,,uuid-here\n```\n\n### Exemple de fichier JSON:\n```json\n[\n {\n \"brand_name\": \"Samsung\",\n \"device_model\": \"Galaxy S21\",\n \"memory\": \"128GB\",\n \"imei_1\": \"353260051234567\",\n \"imei_2\": \"353260051234568\"\n }\n]\n```\n\nNote: Les IMEI dans les exemples suivent la structure réelle (TAC + SNR + Luhn)", "operationId": "bulk_import_from_file_admin_import_file_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_bulk_import_from_file_admin_import_file_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/import-template": { "get": { "tags": [ "Appareils", "Admin" ], "summary": "Get Import Template", "description": "Obtenir un template d'import pour les appareils.\n\n### Formats Disponibles:\n- **csv**: Template CSV avec headers\n- **json**: Template JSON avec exemples\n\n### Champs Disponibles:\n- **marque**: Marque de l'appareil (requis)\n- **modele**: Modèle de l'appareil (requis) \n- **emmc**: Capacité de stockage (optionnel)\n- **imei1**: Premier IMEI (optionnel)\n- **imei2**: Deuxième IMEI (optionnel)\n- **utilisateur_id**: ID du propriétaire UUID (optionnel)", "operationId": "get_import_template_admin_import_template_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "format_type", "in": "query", "required": false, "schema": { "type": "string", "description": "Format du template (csv ou json)", "default": "csv", "title": "Format Type" }, "description": "Format du template (csv ou json)" }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/preview-import": { "post": { "tags": [ "Appareils", "Admin" ], "summary": "Preview Import File", "description": "Prévisualiser un fichier d'import avant l'import réel.\n\n### Fonctionnalités:\n- Valide le format du fichier\n- Applique le mappage de colonnes\n- Vérifie la validité des données\n- Affiche un aperçu des premiers enregistrements\n- Signale les erreurs potentielles\n\n### Paramètres:\n- **file**: Fichier JSON ou CSV à prévisualiser\n- **column_mapping**: Mappage de colonnes (JSON)\n- **max_preview_rows**: Nombre maximum de lignes à prévisualiser (défaut: 10)", "operationId": "preview_import_file_admin_preview_import_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_preview_import_file_admin_preview_import_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/appareils/{appareil_id}/imeis": { "post": { "tags": [ "Appareils" ], "summary": "Add Imei To Device", "description": "Ajouter un IMEI à un appareil existant.\n\n### Paramètres requis\n- **appareil_id** (path) : UUID de l'appareil\n- **numero_imei** (body) : Numéro IMEI (14-15 chiffres)\n\n### Paramètres optionnels\n- **numero_slot** : Slot SIM (1 ou 2, auto-assigné si omis)\n- **statut** : Statut de l'IMEI (défaut: \"actif\")\n\n### � Exemple de requête\n```json\n{\n \"numero_imei\": \"123456789012345\",\n \"numero_slot\": 1,\n \"statut\": \"actif\"\n}\n```\n\n### Validations\n- IMEI unique dans le système\n- Format numérique 14-15 chiffres\n- Maximum 2 IMEIs par appareil\n- Appareil existant requis\n\n### Codes d'erreur\n- **400** : Données invalides ou format IMEI incorrect\n- **404** : Appareil non trouvé\n- **409** : IMEI déjà existant\n- **422** : Limite de 2 IMEIs atteinte\n\n### Support multilingue\nUtilisez `Accept-Language: fr|en|ar` pour les messages localisés.", "operationId": "add_imei_to_device_appareils__appareil_id__imeis_post", "parameters": [ { "name": "appareil_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Appareil Id" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Imei Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/imeis/{imei_id}/status": { "put": { "tags": [ "IMEI", "Admin" ], "summary": "Update Imei Status", "description": "Mettre à jour le statut d'un IMEI avec journalisation d'audit - Administrateurs uniquement.", "operationId": "update_imei_status_imeis__imei_id__status_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "imei_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Imei Id" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Status Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/utilisateurs/{user_id}/recherches": { "get": { "tags": [ "Historique de Recherche" ], "summary": "User Search History", "description": "Obtenir l'historique de recherche d'un utilisateur.", "operationId": "user_search_history_utilisateurs__user_id__recherches_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/notifications": { "get": { "tags": [ "Notifications" ], "summary": "List Notifications", "description": "Lister les notifications.", "operationId": "list_notifications_notifications_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/journaux-audit": { "get": { "tags": [ "Admin" ], "summary": "Get Audit Logs", "description": "Obtenir les journaux d'audit avec filtrage amélioré - Administrateurs uniquement.", "operationId": "get_audit_logs_admin_journaux_audit_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" } }, { "name": "action_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Action Filter" } }, { "name": "entity_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entity Type" } }, { "name": "start_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "End Date" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/verify_imei": { "post": { "tags": [ "IMEI", "Intégration" ], "summary": "Vérification IMEI Multi-Protocoles", "description": "Vérifier un IMEI via différents protocoles (REST, SS7, Diameter) selon la configuration", "operationId": "verify_imei_multi_protocol_verify_imei_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "protocol", "in": "query", "required": false, "schema": { "type": "string", "description": "Protocole à utiliser (rest, ss7, diameter)", "default": "rest", "title": "Protocol" }, "description": "Protocole à utiliser (rest, ss7, diameter)" }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Request Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/protocols/status": { "get": { "tags": [ "Système", "Intégration" ], "summary": "Statut des Protocoles", "description": "Obtenir le statut d'activation des protocoles d'intégration", "operationId": "get_protocols_status_protocols_status_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/imei/{imei}/validate": { "get": { "tags": [ "IMEI", "TAC" ], "summary": "Validation IMEI avec base TAC", "description": "Valider un IMEI en utilisant la base de données TAC et l'algorithme Luhn", "operationId": "valider_imei_avec_tac_endpoint_imei__imei__validate_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "imei", "in": "path", "required": true, "schema": { "type": "string", "title": "Imei" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tac/{tac}": { "get": { "tags": [ "TAC" ], "summary": "Recherche TAC", "description": "Rechercher les informations d'un code TAC dans la base de données", "operationId": "rechercher_tac_tac__tac__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tac", "in": "path", "required": true, "schema": { "type": "string", "title": "Tac" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/tac/stats": { "get": { "tags": [ "TAC", "Admin" ], "summary": "Statistiques TAC", "description": "## Statistiques de la Base TAC\n \n Obtenir des statistiques détaillées sur la base de données TAC.\n \n ### Informations retournées :\n - Nombre total de TAC enregistrés\n - Répartition par marques\n - Répartition par types d'appareils\n - Répartition par statuts\n - Top 10 des marques", "operationId": "statistiques_tac_admin_tac_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/tac/sync": { "post": { "tags": [ "TAC", "Admin" ], "summary": "Synchronisation TAC", "description": "## Synchronisation Base TAC\n\nSynchroniser la base de données TAC depuis les sources externes configurées.\n\n### Sources disponibles :\n- **osmocom_csv** : API CSV Osmocom (par défaut)\n- **osmocom_json** : API JSON Osmocom\n- **local_file** : Fichier local\n\n### Processus :\n1. Téléchargement depuis la source\n2. Validation des données\n3. Import avec gestion des conflits\n4. Journalisation des résultats", "operationId": "synchroniser_tac_admin_tac_sync_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "type": "string", "description": "Source de synchronisation", "default": "osmocom_csv", "title": "Source" }, "description": "Source de synchronisation" }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/tac/sync/logs": { "get": { "tags": [ "TAC", "Admin" ], "summary": "Logs de synchronisation TAC", "description": "Obtenir l'historique des synchronisations TAC", "operationId": "logs_synchronisation_tac_admin_tac_sync_logs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Nombre de logs à retourner", "default": 20, "title": "Limit" }, "description": "Nombre de logs à retourner" }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/tac/import": { "post": { "tags": [ "TAC", "Admin" ], "summary": "Import TAC depuis fichier", "description": "Importer des données TAC depuis un fichier CSV ou JSON", "operationId": "importer_tac_fichier_admin_tac_import_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_importer_tac_fichier_admin_tac_import_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/imei/{imei}/details": { "get": { "tags": [ "IMEI", "TAC" ], "summary": "Détails complets IMEI", "description": "Obtenir tous les détails d'un IMEI incluant validation TAC et informations de base", "operationId": "details_complets_imei_imei__imei__details_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "imei", "in": "path", "required": true, "schema": { "type": "string", "title": "Imei" } }, { "name": "accept-language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accept-Language" } }, { "name": "X-Language", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Language" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/notifications/scheduler/status": { "get": { "tags": [ "Admin" ], "summary": "Obtenir Statut Planificateur", "description": "Obtient le statut du planificateur de notifications\n**Réservé aux administrateurs**", "operationId": "obtenir_statut_planificateur_admin_notifications_scheduler_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/notifications/scheduler/trigger/{job_id}": { "post": { "tags": [ "Admin" ], "summary": "Declencher Tache Planificateur", "description": "Déclenche manuellement une tâche du planificateur\n\n- **process_notifications**: Traiter les notifications en attente\n- **cleanup_notifications**: Nettoyer les anciennes notifications\n- **log_statistics**: Logger les statistiques actuelles\n\n**Réservé aux administrateurs**", "operationId": "declencher_tache_planificateur_admin_notifications_scheduler_trigger__job_id__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/test-email-config": { "get": { "summary": "Test Email Config", "description": "Test email configuration from .env file", "operationId": "test_email_config_test_email_config_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/debug-env": { "get": { "summary": "Debug Env", "description": "Debug endpoint to check environment variables", "operationId": "debug_env_debug_env_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/test-send-email": { "post": { "summary": "Test Send Email", "description": "Send a test email to verify the email service is working", "operationId": "test_send_email_test_send_email_post", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "title": "Email Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "AvailableTemplatesResponse": { "properties": { "templates": { "items": { "$ref": "#/components/schemas/MappingTemplate" }, "type": "array", "title": "Templates" }, "categories": { "items": { "type": "string" }, "type": "array", "title": "Categories" } }, "type": "object", "required": [ "templates", "categories" ], "title": "AvailableTemplatesResponse", "description": "Réponse avec les templates disponibles" }, "Body_bulk_import_from_file_admin_import_file_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "column_mapping": { "type": "string", "title": "Column Mapping", "default": "{}" } }, "type": "object", "required": [ "file" ], "title": "Body_bulk_import_from_file_admin_import_file_post" }, "Body_import_csv_import_csv_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File", "description": "Sélectionner un fichier CSV depuis votre appareil" }, "blacklist_only": { "type": "boolean", "title": "Blacklist Only", "description": "Marquer tous les appareils comme blacklistés", "default": false }, "assign_to_user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assign To User", "description": "ID utilisateur pour assigner les appareils" } }, "type": "object", "required": [ "file" ], "title": "Body_import_csv_import_csv_post" }, "Body_import_file_upload_import_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File", "description": "Fichier CSV ou JSON à importer" }, "blacklist_only": { "type": "boolean", "title": "Blacklist Only", "description": "Marquer tous les appareils comme blacklistés", "default": false } }, "type": "object", "required": [ "file" ], "title": "Body_import_file_upload_import_upload_post" }, "Body_import_json_import_json_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File", "description": "Sélectionner un fichier JSON depuis votre appareil" }, "blacklist_only": { "type": "boolean", "title": "Blacklist Only", "description": "Marquer tous les appareils comme blacklistés", "default": false }, "assign_to_user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assign To User", "description": "ID utilisateur pour assigner les appareils" } }, "type": "object", "required": [ "file" ], "title": "Body_import_json_import_json_post" }, "Body_importer_tac_fichier_admin_tac_import_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "format_source": { "type": "string", "title": "Format Source", "description": "Format source (osmocom, standard)", "default": "osmocom" } }, "type": "object", "required": [ "file" ], "title": "Body_importer_tac_fichier_admin_tac_import_post" }, "Body_preview_import_file_admin_preview_import_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "column_mapping": { "type": "string", "title": "Column Mapping", "default": "{}" }, "max_preview_rows": { "type": "integer", "title": "Max Preview Rows", "default": 10 } }, "type": "object", "required": [ "file" ], "title": "Body_preview_import_file_admin_preview_import_post" }, "Body_simple_file_upload_import_simple_upload_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File", "description": "Sélectionner un fichier CSV ou JSON depuis votre appareil" }, "force_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Force Status", "description": "Forcer un statut pour tous les appareils (active/suspect/bloque)" } }, "type": "object", "required": [ "file" ], "title": "Body_simple_file_upload_import_simple_upload_post" }, "ColumnMappingSuggestion": { "properties": { "db_field": { "type": "string", "title": "Db Field", "description": "Nom du champ dans la base de données" }, "suggested_columns": { "items": { "type": "string" }, "type": "array", "title": "Suggested Columns", "description": "Colonnes suggérées du fichier" }, "is_required": { "type": "boolean", "title": "Is Required", "description": "Si ce champ est obligatoire" }, "description": { "type": "string", "title": "Description", "description": "Description du champ" } }, "type": "object", "required": [ "db_field", "suggested_columns", "is_required", "description" ], "title": "ColumnMappingSuggestion", "description": "Suggestion de mapping de colonne" }, "ConnexionUtilisateur": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" }, "mot_de_passe": { "type": "string", "title": "Mot De Passe" } }, "type": "object", "required": [ "email", "mot_de_passe" ], "title": "ConnexionUtilisateur", "description": "Schéma pour la connexion d'un utilisateur" }, "CreationUtilisateur": { "properties": { "nom": { "type": "string", "title": "Nom" }, "email": { "type": "string", "format": "email", "title": "Email" }, "mot_de_passe": { "type": "string", "title": "Mot De Passe" }, "type_utilisateur": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type Utilisateur", "default": "utilisateur_authentifie" } }, "type": "object", "required": [ "nom", "email", "mot_de_passe" ], "title": "CreationUtilisateur", "description": "Schéma pour la création d'un nouvel utilisateur" }, "DemandeResetPassword": { "properties": { "email": { "type": "string", "format": "email", "title": "Email", "description": "Email de l'utilisateur" }, "methode_verification": { "allOf": [ { "$ref": "#/components/schemas/MethodeVerification" } ], "description": "Méthode de vérification (email ou sms)", "default": "email" }, "telephone": { "anyOf": [ { "type": "string", "pattern": "^(\\+?[1-9]\\d{1,14})$" }, { "type": "null" } ], "title": "Telephone", "description": "Numéro de téléphone pour la vérification par SMS" } }, "type": "object", "required": [ "email" ], "title": "DemandeResetPassword", "description": "Schema pour demander un reset de mot de passe" }, "EnvoiNotificationAdmin": { "properties": { "email_utilisateur": { "type": "string", "format": "email", "title": "Email Utilisateur", "description": "Adresse email de l'utilisateur destinataire" }, "type": { "allOf": [ { "$ref": "#/components/schemas/NotificationType" } ], "description": "Type de notification (email uniquement pour cette version simplifiée)" }, "sujet": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sujet", "description": "Sujet du message (requis pour email)" }, "contenu": { "type": "string", "minLength": 1, "title": "Contenu", "description": "Contenu du message à envoyer" }, "envoyer_immediatement": { "type": "boolean", "title": "Envoyer Immediatement", "description": "Envoyer immédiatement par défaut pour l'admin", "default": true }, "priorite": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priorite", "description": "Priorité de la notification (normale, haute, urgente)", "default": "normale" } }, "type": "object", "required": [ "email_utilisateur", "type", "contenu" ], "title": "EnvoiNotificationAdmin", "description": "Schéma pour qu'un administrateur envoie une notification à un utilisateur spécifique par email" }, "EnvoiNotificationLotAdmin": { "properties": { "utilisateurs_ids": { "items": { "type": "string" }, "type": "array", "title": "Utilisateurs Ids", "description": "Liste des IDs des utilisateurs destinataires" }, "type": { "allOf": [ { "$ref": "#/components/schemas/NotificationType" } ], "description": "Type de notification (email ou sms)" }, "sujet": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sujet", "description": "Sujet du message (requis pour email)" }, "contenu": { "type": "string", "minLength": 1, "title": "Contenu", "description": "Contenu du message à envoyer" }, "priorite": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priorite", "description": "Priorité de la notification", "default": "normale" }, "filtre_utilisateurs_actifs": { "type": "boolean", "title": "Filtre Utilisateurs Actifs", "description": "Filtrer uniquement les utilisateurs actifs", "default": true } }, "type": "object", "required": [ "utilisateurs_ids", "type", "contenu" ], "title": "EnvoiNotificationLotAdmin", "description": "Schéma pour qu'un administrateur envoie des notifications en lot" }, "EnvoiNotificationLotAdminParEmail": { "properties": { "emails": { "items": { "type": "string" }, "type": "array", "title": "Emails", "description": "Liste des adresses email des destinataires" }, "type": { "allOf": [ { "$ref": "#/components/schemas/NotificationType" } ], "description": "Type de notification (email ou sms)" }, "sujet": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sujet", "description": "Sujet du message (requis pour email)" }, "contenu": { "type": "string", "minLength": 1, "title": "Contenu", "description": "Contenu du message à envoyer" }, "priorite": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priorite", "description": "Priorité de la notification", "default": "normale" }, "filtre_utilisateurs_actifs": { "type": "boolean", "title": "Filtre Utilisateurs Actifs", "description": "Filtrer uniquement les utilisateurs actifs", "default": true } }, "type": "object", "required": [ "emails", "type", "contenu" ], "title": "EnvoiNotificationLotAdminParEmail", "description": "Schéma pour qu'un administrateur envoie des notifications en lot en utilisant directement les emails" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "ImportConfigRequest": { "properties": { "column_mapping": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Column Mapping", "description": "Mapping personnalisé des colonnes {champ_db: nom_colonne_fichier}" }, "blacklist_only": { "type": "boolean", "title": "Blacklist Only", "description": "Si True, marque tous les appareils comme blacklistés", "default": false }, "assign_to_user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assign To User", "description": "ID de l'utilisateur à qui assigner les appareils (UUID)" }, "skip_validation": { "type": "boolean", "title": "Skip Validation", "description": "Si True, ignore la validation IMEI (non recommandé)", "default": false }, "update_existing": { "type": "boolean", "title": "Update Existing", "description": "Si True, met à jour les appareils existants", "default": false } }, "type": "object", "title": "ImportConfigRequest", "description": "Configuration pour l'import" }, "ImportPreviewRequest": { "properties": { "file_content": { "type": "string", "title": "File Content", "description": "Contenu du fichier" }, "file_type": { "type": "string", "title": "File Type", "description": "Type de fichier: 'csv' ou 'json'" }, "config": { "anyOf": [ { "$ref": "#/components/schemas/ImportConfigRequest" }, { "type": "null" } ], "description": "Configuration d'import" }, "preview_rows": { "type": "integer", "maximum": 20.0, "minimum": 1.0, "title": "Preview Rows", "description": "Nombre de lignes à prévisualiser", "default": 5 } }, "type": "object", "required": [ "file_content", "file_type" ], "title": "ImportPreviewRequest", "description": "Requête pour prévisualiser l'import" }, "ImportPreviewResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "file_type": { "type": "string", "title": "File Type" }, "total_rows": { "type": "integer", "title": "Total Rows" }, "headers": { "items": { "type": "string" }, "type": "array", "title": "Headers" }, "column_mapping_suggestions": { "items": { "$ref": "#/components/schemas/ColumnMappingSuggestion" }, "type": "array", "title": "Column Mapping Suggestions" }, "detected_mapping": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Detected Mapping" }, "preview_data": { "items": { "type": "object" }, "type": "array", "title": "Preview Data" }, "errors": { "items": { "type": "string" }, "type": "array", "title": "Errors", "default": [] }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "default": [] } }, "type": "object", "required": [ "success", "file_type", "total_rows", "headers", "column_mapping_suggestions", "detected_mapping", "preview_data" ], "title": "ImportPreviewResponse", "description": "Réponse de prévisualisation d'import" }, "ImportResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "summary": { "anyOf": [ { "$ref": "#/components/schemas/ImportResultSummary" }, { "type": "null" } ] }, "column_mapping_used": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Column Mapping Used", "default": {} }, "errors": { "items": { "type": "string" }, "type": "array", "title": "Errors", "default": [] }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "default": [] }, "import_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Import Id" }, "processing_time_seconds": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Processing Time Seconds" } }, "type": "object", "required": [ "success", "message" ], "title": "ImportResponse", "description": "Réponse d'import" }, "ImportResultSummary": { "properties": { "total_rows": { "type": "integer", "title": "Total Rows" }, "processed": { "type": "integer", "title": "Processed" }, "appareils_created": { "type": "integer", "title": "Appareils Created" }, "imeis_created": { "type": "integer", "title": "Imeis Created" }, "errors_count": { "type": "integer", "title": "Errors Count" }, "warnings_count": { "type": "integer", "title": "Warnings Count" } }, "type": "object", "required": [ "total_rows", "processed", "appareils_created", "imeis_created", "errors_count", "warnings_count" ], "title": "ImportResultSummary", "description": "Résumé des résultats d'import" }, "InfoNiveauAcces": { "properties": { "niveau": { "type": "string", "title": "Niveau" }, "description": { "type": "string", "title": "Description" }, "permissions_par_defaut": { "items": { "type": "string" }, "type": "array", "title": "Permissions Par Defaut" }, "portee_donnees": { "type": "string", "title": "Portee Donnees" } }, "type": "object", "required": [ "niveau", "description", "permissions_par_defaut", "portee_donnees" ], "title": "InfoNiveauAcces" }, "Jeton": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "token_type": { "type": "string", "title": "Token Type" } }, "type": "object", "required": [ "access_token", "token_type" ], "title": "Jeton", "description": "Schéma pour le jeton d'authentification" }, "MappingTemplate": { "properties": { "name": { "type": "string", "title": "Name", "description": "Nom du template" }, "description": { "type": "string", "title": "Description", "description": "Description du template" }, "system_type": { "type": "string", "title": "System Type", "description": "Type de système (telecom, mdm, inventory, etc.)" }, "mapping": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Mapping", "description": "Mapping des colonnes" }, "example_headers": { "items": { "type": "string" }, "type": "array", "title": "Example Headers", "description": "Exemples d'en-têtes" } }, "type": "object", "required": [ "name", "description", "system_type", "mapping", "example_headers" ], "title": "MappingTemplate", "description": "Template de mapping prédéfini" }, "MappingValidationRequest": { "properties": { "headers": { "items": { "type": "string" }, "type": "array", "title": "Headers", "description": "En-têtes du fichier" }, "proposed_mapping": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Proposed Mapping", "description": "Mapping proposé" } }, "type": "object", "required": [ "headers", "proposed_mapping" ], "title": "MappingValidationRequest", "description": "Requête de validation de mapping" }, "MappingValidationResponse": { "properties": { "is_valid": { "type": "boolean", "title": "Is Valid" }, "missing_required_fields": { "items": { "type": "string" }, "type": "array", "title": "Missing Required Fields", "default": [] }, "unknown_fields": { "items": { "type": "string" }, "type": "array", "title": "Unknown Fields", "default": [] }, "suggestions": { "items": { "$ref": "#/components/schemas/ColumnMappingSuggestion" }, "type": "array", "title": "Suggestions", "default": [] }, "validated_mapping": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Validated Mapping", "default": {} } }, "type": "object", "required": [ "is_valid" ], "title": "MappingValidationResponse", "description": "Réponse de validation de mapping" }, "MethodeVerification": { "type": "string", "enum": [ "email", "sms" ], "title": "MethodeVerification", "description": "Méthodes de vérification disponibles" }, "MiseAJourPermission": { "properties": { "niveau_acces": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Niveau Acces", "description": "Nouveau niveau d'accès pour l'utilisateur" }, "portee_donnees": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Portee Donnees", "description": "Portée d'accès aux données" }, "organisation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Organisation", "description": "Assignation d'organisation" }, "marques_autorisees": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Marques Autorisees", "description": "Marques d'appareils autorisées" }, "plages_imei_autorisees": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Plages Imei Autorisees", "description": "Plages IMEI autorisées" }, "operations_personnalisees": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Operations Personnalisees", "description": "Permissions d'opérations personnalisées" }, "est_actif": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Est Actif", "description": "Statut du compte" } }, "type": "object", "title": "MiseAJourPermission" }, "NotificationType": { "type": "string", "enum": [ "email", "sms" ], "title": "NotificationType", "description": "Types de notifications supportés" }, "NouveauMotDePasse": { "properties": { "token": { "type": "string", "title": "Token", "description": "Token de reset validé" }, "nouveau_mot_de_passe": { "type": "string", "minLength": 8, "title": "Nouveau Mot De Passe", "description": "Nouveau mot de passe (minimum 8 caractères)" }, "confirmer_mot_de_passe": { "type": "string", "title": "Confirmer Mot De Passe", "description": "Confirmation du nouveau mot de passe" } }, "type": "object", "required": [ "token", "nouveau_mot_de_passe", "confirmer_mot_de_passe" ], "title": "NouveauMotDePasse", "description": "Schema pour définir un nouveau mot de passe" }, "ProfilUtilisateurDetaille": { "properties": { "id": { "type": "string", "title": "Id", "description": "Identifiant unique de l'utilisateur" }, "nom": { "type": "string", "title": "Nom", "description": "Nom complet de l'utilisateur" }, "email": { "type": "string", "title": "Email", "description": "Adresse email de l'utilisateur" }, "type_utilisateur": { "type": "string", "title": "Type Utilisateur", "description": "Type d'utilisateur (administrateur, utilisateur_authentifie)" }, "niveau_acces": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Niveau Acces", "description": "Niveau d'accès de l'utilisateur" }, "portee_donnees": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Portee Donnees", "description": "Portée des données accessibles par l'utilisateur" }, "organisation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Organisation", "description": "Organisation à laquelle l'utilisateur est affilié" }, "est_actif": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Est Actif", "description": "Statut actif du compte utilisateur", "default": true }, "marques_autorisees": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Marques Autorisees", "description": "Liste des marques d'appareils accessibles par l'utilisateur" }, "plages_imei_autorisees": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Plages Imei Autorisees", "description": "Plages ou préfixes IMEI autorisés pour l'utilisateur" }, "date_creation": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Date Creation", "description": "Date de création du compte" }, "derniere_connexion": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Derniere Connexion", "description": "Date et heure de la dernière connexion" }, "statut_compte": { "type": "string", "title": "Statut Compte", "description": "Statut du compte (active, suspendu, etc.)", "default": "active" }, "permissions": { "items": { "type": "string" }, "type": "array", "title": "Permissions", "description": "Liste des permissions accordées" }, "statistiques": { "type": "object", "title": "Statistiques", "description": "Statistiques d'utilisation" } }, "type": "object", "required": [ "id", "nom", "email", "type_utilisateur" ], "title": "ProfilUtilisateurDetaille", "description": "Schéma de réponse détaillé pour le profil utilisateur" }, "ReponseEnvoiImmediat": { "properties": { "success": { "type": "boolean", "title": "Success", "description": "Succès de l'envoi" }, "message": { "type": "string", "title": "Message", "description": "Message de résultat" }, "notification_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Notification Id", "description": "ID de la notification créée" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error", "description": "Message d'erreur si échec" } }, "type": "object", "required": [ "success", "message" ], "title": "ReponseEnvoiImmediat", "description": "Schéma de réponse pour un envoi immédiat" }, "ReponseEnvoiLotAdmin": { "properties": { "total_utilisateurs": { "type": "integer", "title": "Total Utilisateurs", "description": "Nombre total d'utilisateurs ciblés" }, "envoyes_succes": { "type": "integer", "title": "Envoyes Succes", "description": "Nombre d'envois réussis" }, "envoyes_echec": { "type": "integer", "title": "Envoyes Echec", "description": "Nombre d'envois échoués" }, "utilisateurs_introuvables": { "items": { "type": "string" }, "type": "array", "title": "Utilisateurs Introuvables", "description": "IDs des utilisateurs introuvables" }, "utilisateurs_inactifs": { "items": { "type": "string" }, "type": "array", "title": "Utilisateurs Inactifs", "description": "IDs des utilisateurs inactifs (si filtrage activé)" }, "details_envois": { "items": { "type": "object" }, "type": "array", "title": "Details Envois", "description": "Détails des envois" }, "duree_traitement_secondes": { "type": "number", "title": "Duree Traitement Secondes", "description": "Durée du traitement en secondes" } }, "type": "object", "required": [ "total_utilisateurs", "envoyes_succes", "envoyes_echec", "utilisateurs_introuvables", "utilisateurs_inactifs", "details_envois", "duree_traitement_secondes" ], "title": "ReponseEnvoiLotAdmin", "description": "Schéma de réponse pour l'envoi en lot par l'admin" }, "ReponseResetPassword": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Token" }, "methode_verification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Methode Verification" }, "expires_in_minutes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Expires In Minutes" } }, "type": "object", "required": [ "success", "message" ], "title": "ReponseResetPassword", "description": "Schema de réponse pour les opérations de reset password" }, "ReponseUtilisateur": { "properties": { "id": { "type": "string", "title": "Id" }, "nom": { "type": "string", "title": "Nom" }, "email": { "type": "string", "title": "Email" }, "type_utilisateur": { "type": "string", "title": "Type Utilisateur" }, "niveau_acces": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Niveau Acces" } }, "type": "object", "required": [ "id", "nom", "email", "type_utilisateur" ], "title": "ReponseUtilisateur", "description": "Schéma de réponse pour les informations utilisateur" }, "ResumePermissionUtilisateur": { "properties": { "id_utilisateur": { "type": "string", "title": "Id Utilisateur" }, "nom": { "type": "string", "title": "Nom" }, "email": { "type": "string", "title": "Email" }, "niveau_acces": { "type": "string", "title": "Niveau Acces" }, "portee_donnees": { "type": "string", "title": "Portee Donnees" }, "organisation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Organisation" }, "est_actif": { "type": "boolean", "title": "Est Actif" }, "nombre_permissions": { "type": "integer", "title": "Nombre Permissions" }, "nombre_restrictions": { "type": "integer", "title": "Nombre Restrictions" } }, "type": "object", "required": [ "id_utilisateur", "nom", "email", "niveau_acces", "portee_donnees", "organisation", "est_actif", "nombre_permissions", "nombre_restrictions" ], "title": "ResumePermissionUtilisateur" }, "StatistiquesNotifications": { "properties": { "total_notifications": { "type": "integer", "title": "Total Notifications", "description": "Nombre total de notifications" }, "en_attente": { "type": "integer", "title": "En Attente", "description": "Notifications en attente" }, "envoyes": { "type": "integer", "title": "Envoyes", "description": "Notifications envoyées" }, "echecs": { "type": "integer", "title": "Echecs", "description": "Notifications échouées" }, "emails_total": { "type": "integer", "title": "Emails Total", "description": "Total d'emails" }, "sms_total": { "type": "integer", "title": "Sms Total", "description": "Total de SMS" }, "derniere_24h": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Derniere 24H", "description": "Statistiques des dernières 24h" }, "taux_succes": { "type": "number", "title": "Taux Succes", "description": "Taux de succès en pourcentage" } }, "type": "object", "required": [ "total_notifications", "en_attente", "envoyes", "echecs", "emails_total", "sms_total", "derniere_24h", "taux_succes" ], "title": "StatistiquesNotifications", "description": "Schéma pour les statistiques des notifications" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "VerificationCodeReset": { "properties": { "token": { "type": "string", "title": "Token", "description": "Token de reset reçu" }, "code_verification": { "type": "string", "maxLength": 6, "minLength": 6, "title": "Code Verification", "description": "Code de vérification à 6 chiffres" } }, "type": "object", "required": [ "token", "code_verification" ], "title": "VerificationCodeReset", "description": "Schema pour vérifier le code de reset" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } }, "tags": [ { "name": "Système", "description": "Informations système et vérifications d'état" }, { "name": "Public", "description": "Points de terminaison publics disponibles pour tous les utilisateurs" }, { "name": "Authentification", "description": "Authentification et autorisation des utilisateurs" }, { "name": "IMEI", "description": "Services de validation et recherche d'IMEI" }, { "name": "Appareils", "description": "Opérations de gestion des appareils" }, { "name": "Cartes SIM", "description": "Opérations de gestion des cartes SIM" }, { "name": "Utilisateurs", "description": "Opérations de gestion des utilisateurs" }, { "name": "Historique de Recherche", "description": "Points de terminaison d'historique et suivi des recherches" }, { "name": "Notifications", "description": "Points de terminaison de gestion des notifications" }, { "name": "Analyses", "description": "Points de terminaison d'analyses et rapports" }, { "name": "Admin", "description": "Opérations administratives" } ] }