{ "openapi": "3.1.0", "info": { "title": "SIOP V2 API", "version": "0.1.0", "description": "GMAO ascenseurs — contrat R0 (auth, démo-login ADR-002, profil, santé). Généré depuis packages/shared/src/contract.ts — NE PAS ÉDITER À LA MAIN." }, "paths": { "/auth/login": { "post": { "operationId": "login", "summary": "Connexion par e-mail et mot de passe", "tags": [ "auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } } }, "responses": { "200": { "description": "Jeton émis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" } } } }, "401": { "description": "Identifiants invalides ou compte inactif" } } } }, "/auth/demo-accounts": { "get": { "operationId": "listDemoAccounts", "summary": "Comptes de démonstration (ADR-002 — jamais de secret)", "tags": [ "auth", "demo" ], "x-demo-only": true, "description": "ADR-002 : cette route est absente (404) quand DEMO_MODE n’est pas actif.", "responses": { "200": { "description": "Comptes isDemo actifs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemoAccountsResponse" } } } } } } }, "/auth/demo-login": { "post": { "operationId": "demoLogin", "summary": "Connexion 1 clic sur un compte de démonstration (ADR-002)", "tags": [ "auth", "demo" ], "x-demo-only": true, "description": "ADR-002 : cette route est absente (404) quand DEMO_MODE n’est pas actif.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DemoLoginRequest" } } } }, "responses": { "200": { "description": "Jeton émis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" } } } }, "403": { "description": "Le compte n’est pas un compte de démonstration" }, "404": { "description": "Compte inconnu" } } } }, "/users/me": { "get": { "operationId": "getMe", "summary": "Profil courant + matrice de permissions du rôle", "tags": [ "users" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Profil", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MeResponse" } } } }, "401": { "description": "Non authentifié" } } } }, "/auth/activate": { "post": { "operationId": "activateAccount", "summary": "Activer un compte invité (lien 7 jours) — connecte directement", "tags": [ "auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivateRequest" } } } }, "responses": { "200": { "description": "Compte activé et connecté", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" } } } }, "400": { "description": "Lien invalide ou expiré" } } } }, "/categories": { "get": { "operationId": "listCategories", "summary": "Référentiels administrables (catégories d’équipement, types d’organes)", "tags": [ "categories" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoriesResponse" } } } } } }, "post": { "operationId": "createCategory", "summary": "Ajouter une catégorie", "tags": [ "categories" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoryCreate" } } } }, "responses": { "201": { "description": "Créée", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" } } } }, "409": { "description": "Nom déjà utilisé pour ce type" } } } }, "/categories/{id}": { "patch": { "operationId": "updateCategory", "summary": "Renommer ou (dés)activer — jamais de suppression si utilisée", "tags": [ "categories" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoryUpdate" } } } }, "responses": { "200": { "description": "Mise à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" } } } }, "404": { "description": "Inconnue" } } } }, "/locations": { "get": { "operationId": "listLocations", "summary": "Sites et zones (liste plate, le client construit l’arbre)", "tags": [ "locations" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationsResponse" } } } } } }, "post": { "operationId": "createLocation", "summary": "Créer un site (sans parent) ou une zone (profondeur max 2)", "tags": [ "locations" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationCreate" } } } }, "responses": { "201": { "description": "Créé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location" } } } }, "400": { "description": "Hiérarchie trop profonde" } } } }, "/locations/{id}": { "patch": { "operationId": "updateLocation", "summary": "Modifier un emplacement", "tags": [ "locations" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationUpdate" } } } }, "responses": { "200": { "description": "Mis à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location" } } } }, "404": { "description": "Inconnu" } } } }, "/assets": { "get": { "operationId": "listAssets", "summary": "Inventaire des appareils", "tags": [ "assets" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetsResponse" } } } } } }, "post": { "operationId": "createAsset", "summary": "Créer un appareil (avec ses organes) — le QR découle de la référence", "tags": [ "assets" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetCreate" } } } }, "responses": { "201": { "description": "Créé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetDetail" } } } }, "409": { "description": "Référence déjà utilisée" } } } }, "/assets/options": { "get": { "operationId": "listAssetOptions", "summary": "Options d’appareils pour le signalement (tout rôle authentifié)", "tags": [ "assets" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Options", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetOptionsResponse" } } } } } } }, "/assets/{id}": { "get": { "operationId": "getAsset", "summary": "Fiche appareil (identité + organes)", "tags": [ "assets" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Fiche", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetDetail" } } } }, "404": { "description": "Inconnu" } } }, "patch": { "operationId": "updateAsset", "summary": "Modifier un appareil (dont son statut d’équipement)", "tags": [ "assets" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetUpdate" } } } }, "responses": { "200": { "description": "Mis à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetDetail" } } } }, "404": { "description": "Inconnu" } } } }, "/assets/{id}/components": { "post": { "operationId": "addAssetComponent", "summary": "Ajouter un organe (jamais d’emplacement propre)", "tags": [ "assets" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetComponentCreate" } } } }, "responses": { "201": { "description": "Ajouté", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetComponent" } } } }, "400": { "description": "Le type choisi n’est pas un type d’organe" } } } }, "/assets/{id}/components/{componentId}": { "delete": { "operationId": "removeAssetComponent", "summary": "Retirer un organe", "tags": [ "assets" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "componentId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "204": { "description": "Retiré" }, "404": { "description": "Inconnu" } } } }, "/teams": { "get": { "operationId": "listTeams", "summary": "Équipes et leurs membres", "tags": [ "teams" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamsResponse" } } } } } }, "post": { "operationId": "createTeam", "summary": "Créer une équipe", "tags": [ "teams" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamCreate" } } } }, "responses": { "201": { "description": "Créée", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } } }, "409": { "description": "Nom déjà utilisé" } } } }, "/teams/{id}": { "patch": { "operationId": "updateTeam", "summary": "Modifier une équipe (nom, description, membres)", "tags": [ "teams" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamUpdate" } } } }, "responses": { "200": { "description": "Mise à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } } }, "404": { "description": "Inconnue" } } } }, "/users": { "get": { "operationId": "listUsers", "summary": "Personnes (statut dérivé : actif / invité / désactivé)", "tags": [ "users" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersResponse" } } } } } } }, "/roles": { "get": { "operationId": "listRoles", "summary": "Les 7 rôles (pour l’invitation)", "tags": [ "users" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RolesResponse" } } } } } } }, "/users/invitations": { "post": { "operationId": "inviteUser", "summary": "Inviter — crée le compte inactif et émet le lien d’activation (7 j)", "tags": [ "users" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvitationCreate" } } } }, "responses": { "201": { "description": "Invitation émise", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvitationResponse" } } } }, "409": { "description": "Email déjà utilisé" } } } }, "/users/{id}/invitation": { "post": { "operationId": "resendInvitation", "summary": "Régénérer le lien d’activation d’un compte non activé", "tags": [ "users" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Nouveau lien", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvitationResponse" } } } }, "409": { "description": "Compte déjà activé" } } } }, "/users/{id}": { "patch": { "operationId": "updateUser", "summary": "Modifier une personne (rôle, équipes, activation du compte)", "tags": [ "users" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUpdate" } } } }, "responses": { "200": { "description": "Mise à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserAdmin" } } } }, "404": { "description": "Inconnue" } } } }, "/documents": { "get": { "operationId": "listDocuments", "summary": "Bibliothèque (filtrable par appareil ou OT)", "tags": [ "documents" ], "parameters": [ { "name": "assetId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "workOrderId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "kind", "in": "query", "required": false, "schema": { "type": "string" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentsResponse" } } } } } }, "post": { "operationId": "uploadDocument", "summary": "Téléverser (PDF/JPG/PNG, 20 Mo max, rattachement appareil OU OT requis)", "tags": [ "documents" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary" }, "kind": { "type": "string" }, "assetId": { "type": "string" }, "workOrderId": { "type": "string" } }, "required": [ "file" ] } } } }, "responses": { "201": { "description": "Document rangé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Document" } } } }, "400": { "description": "Type/taille refusé ou rattachement manquant" } } } }, "/documents/{id}/download": { "get": { "operationId": "downloadDocument", "summary": "Télécharger — streamé par l’API (MinIO jamais exposé)", "tags": [ "documents" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Fichier" }, "404": { "description": "Inconnu" } } } }, "/documents/{id}": { "delete": { "operationId": "deleteDocument", "summary": "Supprimer (permission d’édition sur la cible)", "tags": [ "documents" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "204": { "description": "Supprimé" }, "404": { "description": "Inconnu" } } } }, "/analytics/summary": { "get": { "operationId": "getAnalyticsSummary", "summary": "Le tableau de la direction : coûts, pannes par organe (bilans), préventif, top équipements", "tags": [ "analytics" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Synthèse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsSummary" } } } } } } }, "/partners": { "get": { "operationId": "listPartners", "summary": "Tiers (fournisseurs, syndics) — permission PURCHASE_ORDERS", "tags": [ "partners" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnersResponse" } } } } } }, "post": { "operationId": "createPartner", "summary": "Créer un tiers", "tags": [ "partners" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnerCreate" } } } }, "responses": { "201": { "description": "Créé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Partner" } } } }, "409": { "description": "Nom déjà utilisé" } } } }, "/partners/{id}": { "patch": { "operationId": "updatePartner", "summary": "Modifier / (dés)activer un tiers", "tags": [ "partners" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnerUpdate" } } } }, "responses": { "200": { "description": "Mis à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Partner" } } } }, "404": { "description": "Inconnu" } } } }, "/parts": { "get": { "operationId": "listParts", "summary": "Stock de pièces — quantités DÉRIVÉES des mouvements", "tags": [ "parts" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartsResponse" } } } } } }, "post": { "operationId": "createPart", "summary": "Créer une pièce (référence P-#### générée)", "tags": [ "parts" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartCreate" } } } }, "responses": { "201": { "description": "Créée", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartDetail" } } } } } } }, "/parts/{id}": { "get": { "operationId": "getPart", "summary": "Fiche pièce : les mouvements SONT le stock", "tags": [ "parts" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Fiche", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartDetail" } } } }, "404": { "description": "Inconnue" } } }, "patch": { "operationId": "updatePart", "summary": "Modifier une pièce (désignation, seuil, fournisseur…)", "tags": [ "parts" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartUpdate" } } } }, "responses": { "200": { "description": "Mise à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartDetail" } } } }, "404": { "description": "Inconnue" } } } }, "/parts/{id}/movements": { "post": { "operationId": "addStockMovement", "summary": "Entrée manuelle (+) ou ajustement (± motif REQUIS) — jamais de saisie de stock", "tags": [ "parts" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockMovementCreate" } } } }, "responses": { "201": { "description": "Mouvement tracé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartDetail" } } } }, "409": { "description": "Le stock ne peut pas devenir négatif" } } } }, "/purchase-orders": { "get": { "operationId": "listPurchaseOrders", "summary": "Bons de commande", "tags": [ "purchase-orders" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrdersResponse" } } } } } }, "post": { "operationId": "createPurchaseOrder", "summary": "Créer un BC (brouillon)", "tags": [ "purchase-orders" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderCreate" } } } }, "responses": { "201": { "description": "Créé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrder" } } } }, "400": { "description": "Fournisseur ou pièce invalide" } } } }, "/purchase-orders/{id}": { "get": { "operationId": "getPurchaseOrder", "summary": "Fiche BC (lignes, total)", "tags": [ "purchase-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Fiche", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrder" } } } }, "404": { "description": "Inconnu" } } } }, "/purchase-orders/{id}/transition": { "post": { "operationId": "transitionPurchaseOrder", "summary": "Envoyer / réceptionner (→ entrées de stock, PU figés) / annuler", "tags": [ "purchase-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrderTransition" } } } }, "responses": { "200": { "description": "État changé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PurchaseOrder" } } } }, "409": { "description": "Transition interdite" } } } }, "/work-orders/{id}/consume-part": { "post": { "operationId": "consumePart", "summary": "Consommer une pièce sur l’OT — stock décrémenté, PRIX FIGÉ", "tags": [ "work-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConsumePart" } } } }, "responses": { "201": { "description": "Consommée", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } }, "409": { "description": "Stock insuffisant ou prix inconnu" } } } }, "/work-orders/{id}/labor": { "post": { "operationId": "addLaborTime", "summary": "Saisir de la main-d’œuvre — TAUX FIGÉ à la saisie", "tags": [ "work-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LaborTimeCreate" } } } }, "responses": { "201": { "description": "Saisie", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } }, "409": { "description": "Taux horaire non défini pour cette personne" } } } }, "/portal/assets/{reference}": { "get": { "operationId": "getPortalAsset", "summary": "Résoudre le QR scanné (référence → appareil, préremplissage)", "tags": [ "portal" ], "parameters": [ { "name": "reference", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Appareil", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalAsset" } } } }, "404": { "description": "Référence inconnue" } } } }, "/portal/requests": { "post": { "operationId": "createPortalRequest", "summary": "Signaler sans compte — renvoie le jeton de suivi (à garder sur le téléphone)", "tags": [ "portal" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalRequestCreate" } } } }, "responses": { "201": { "description": "Signalement enregistré", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalRequestCreated" } } } }, "404": { "description": "Référence inconnue" }, "429": { "description": "Trop de signalements — réessayez dans une minute" } } } }, "/portal/requests/{reference}/{token}": { "get": { "operationId": "getPortalRequestStatus", "summary": "Suivi sans jargon (Reçu → Intervention → Résolu) — jeton requis", "tags": [ "portal" ], "parameters": [ { "name": "reference", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Avancement", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalRequestStatus" } } } }, "404": { "description": "Signalement inconnu ou jeton invalide" } } } }, "/preventive/templates": { "get": { "operationId": "listTaskTemplates", "summary": "Gabarits de tâches du préventif (périodicité en mois)", "tags": [ "preventive" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskTemplatesResponse" } } } } } }, "post": { "operationId": "createTaskTemplate", "summary": "Ajouter un gabarit", "tags": [ "preventive" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskTemplateCreate" } } } }, "responses": { "201": { "description": "Créé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskTemplate" } } } }, "409": { "description": "Libellé déjà utilisé" } } } }, "/preventive/templates/{id}": { "patch": { "operationId": "updateTaskTemplate", "summary": "Modifier / (dés)activer un gabarit — jamais de suppression si utilisé", "tags": [ "preventive" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskTemplateUpdate" } } } }, "responses": { "200": { "description": "Mis à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskTemplate" } } } }, "404": { "description": "Inconnu" } } } }, "/preventive/generate": { "post": { "operationId": "generatePreventive", "summary": "Générer la grille du mois — IDEMPOTENT (regénérer ne double rien)", "tags": [ "preventive" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PreventiveGenerate" } } } }, "responses": { "200": { "description": "Résumé de génération", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PreventiveGenerationResult" } } } } } } }, "/preventive/status": { "get": { "operationId": "getPreventiveStatus", "summary": "État du mois courant (générées, terminées, en retard, premiers contrôles)", "tags": [ "preventive" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "État", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PreventiveStatus" } } } } } } }, "/assets/{id}/meters": { "get": { "operationId": "getAssetMeters", "summary": "Compteurs de l’appareil (relevés récents d’abord)", "tags": [ "meters" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Compteurs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetersResponse" } } } }, "404": { "description": "Appareil inconnu" } } } }, "/assets/{id}/meter-readings": { "post": { "operationId": "addMeterReading", "summary": "Enregistrer un relevé — strictement croissant", "tags": [ "meters" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MeterReadingCreate" } } } }, "responses": { "201": { "description": "Relevé enregistré", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetersResponse" } } } }, "400": { "description": "Relevé inférieur ou égal au précédent" } } } }, "/work-orders": { "get": { "operationId": "listWorkOrders", "summary": "Ordres de travail (sans « voir autre » : seulement les siens)", "tags": [ "work-orders" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrdersResponse" } } } } } }, "post": { "operationId": "createWorkOrder", "summary": "Créer un OT (statut Ouvert)", "tags": [ "work-orders" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderCreate" } } } }, "responses": { "201": { "description": "Créé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } } } } }, "/work-orders/{id}": { "get": { "operationId": "getWorkOrder", "summary": "Fiche OT (activité, checklist, bilan, transitions autorisées, blocages de clôture)", "tags": [ "work-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Fiche", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } }, "404": { "description": "Inconnu (ou hors de son périmètre)" } } } }, "/work-orders/{id}/transition": { "post": { "operationId": "transitionWorkOrder", "summary": "Changer l’état (machine à états stricte ; DONE exige bilan + checklist)", "tags": [ "work-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransitionRequest" } } } }, "responses": { "200": { "description": "État changé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } }, "409": { "description": "Transition interdite ou clôture bloquée (garde)" } } } }, "/work-orders/{id}/comments": { "post": { "operationId": "commentWorkOrder", "summary": "Commenter (activité chronologique)", "tags": [ "work-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentCreate" } } } }, "responses": { "201": { "description": "Commentaire ajouté", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } } } } }, "/work-orders/{id}/assignees": { "put": { "operationId": "setWorkOrderAssignees", "summary": "Assigner (remplace la liste)", "tags": [ "work-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssigneesUpdate" } } } }, "responses": { "200": { "description": "Assignés", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } } } } }, "/work-orders/{id}/report": { "put": { "operationId": "upsertWorkOrderReport", "summary": "Renseigner le bilan codé (null efface un champ)", "tags": [ "work-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportUpsert" } } } }, "responses": { "200": { "description": "Bilan enregistré", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } }, "400": { "description": "Valeur hors référentiel du champ" } } } }, "/work-orders/{id}/checklist/{itemId}": { "patch": { "operationId": "patchChecklistItem", "summary": "Régler une tâche de la grille (Fait / N-A / à faire)", "tags": [ "work-orders" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "itemId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChecklistPatch" } } } }, "responses": { "200": { "description": "Tâche réglée", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChecklistItem" } } } }, "404": { "description": "Tâche inconnue" } } } }, "/requests": { "get": { "operationId": "listRequests", "summary": "Demandes (sans « voir autre » : seulement les siennes)", "tags": [ "requests" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestsResponse" } } } } } }, "post": { "operationId": "createRequest", "summary": "Signaler (interne — le portail public QR arrive en R2.4)", "tags": [ "requests" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestCreate" } } } }, "responses": { "201": { "description": "Demande créée", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestSummary" } } } } } } }, "/requests/{id}/approve": { "post": { "operationId": "approveRequest", "summary": "Approuver → crée l’OT lié (1-1, jamais de doublon)", "tags": [ "requests" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestApprove" } } } }, "responses": { "201": { "description": "OT créé et lié", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkOrderDetail" } } } }, "409": { "description": "Demande déjà traitée" } } } }, "/requests/{id}/reject": { "post": { "operationId": "rejectRequest", "summary": "Rejeter — motif obligatoire, lisible côté demandeur", "tags": [ "requests" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestReject" } } } }, "responses": { "200": { "description": "Rejetée", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestSummary" } } } }, "409": { "description": "Demande déjà traitée" } } } }, "/reference-values": { "get": { "operationId": "listReferenceValues", "summary": "Référentiels du bilan codé (6 champs)", "tags": [ "reference-values" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Liste", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReferenceValuesResponse" } } } } } }, "post": { "operationId": "createReferenceValue", "summary": "Ajouter une valeur de référentiel", "tags": [ "reference-values" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReferenceValueCreate" } } } }, "responses": { "201": { "description": "Créée", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReferenceValue" } } } }, "409": { "description": "Libellé déjà présent pour ce champ" } } } }, "/reference-values/{id}": { "patch": { "operationId": "updateReferenceValue", "summary": "Renommer ou (dés)activer — jamais de suppression si utilisée", "tags": [ "reference-values" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReferenceValueUpdate" } } } }, "responses": { "200": { "description": "Mise à jour", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReferenceValue" } } } }, "404": { "description": "Inconnue" } } } }, "/health": { "get": { "operationId": "getHealth", "summary": "État des dépendances (base, Redis, stockage)", "tags": [ "health" ], "responses": { "200": { "description": "État agrégé", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthResponse" } } } } } } } }, "components": { "schemas": { "AuthResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "accessToken": { "type": "string" }, "user": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "displayName": { "type": "string" }, "role": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "enum": [ "Administrateur", "Dispatcher", "Technicien", "Technicien limité", "Gestionnaire", "Demandeur", "Vue seule" ] } }, "required": [ "id", "name" ], "additionalProperties": false }, "isDemo": { "type": "boolean" } }, "required": [ "id", "email", "displayName", "role", "isDemo" ], "additionalProperties": false } }, "required": [ "accessToken", "user" ], "additionalProperties": false }, "LoginRequest": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "password": { "type": "string", "minLength": 1 } }, "required": [ "email", "password" ], "additionalProperties": false }, "DemoAccountsResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "accounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "roleName": { "type": "string", "enum": [ "Administrateur", "Dispatcher", "Technicien", "Technicien limité", "Gestionnaire", "Demandeur", "Vue seule" ] }, "initials": { "type": "string", "minLength": 1, "maxLength": 3 } }, "required": [ "id", "displayName", "roleName", "initials" ], "additionalProperties": false } } }, "required": [ "accounts" ], "additionalProperties": false }, "DemoLoginRequest": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "userId" ], "additionalProperties": false }, "MeResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "displayName": { "type": "string" }, "role": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "enum": [ "Administrateur", "Dispatcher", "Technicien", "Technicien limité", "Gestionnaire", "Demandeur", "Vue seule" ] } }, "required": [ "id", "name" ], "additionalProperties": false }, "isDemo": { "type": "boolean" }, "permissions": { "type": "array", "items": { "type": "object", "properties": { "objectCategory": { "type": "string", "enum": [ "WORK_ORDERS", "REQUESTS", "ASSETS", "LOCATIONS", "METERS", "PARTS", "PURCHASE_ORDERS", "PEOPLE_TEAMS", "ANALYTICS", "SETTINGS" ] }, "canView": { "type": "boolean" }, "canViewOther": { "type": "boolean" }, "canCreate": { "type": "boolean" }, "canEdit": { "type": "boolean" }, "canDelete": { "type": "boolean" } }, "required": [ "objectCategory", "canView", "canViewOther", "canCreate", "canEdit", "canDelete" ], "additionalProperties": false } } }, "required": [ "id", "email", "displayName", "role", "isDemo", "permissions" ], "additionalProperties": false }, "ActivateRequest": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "token": { "type": "string", "minLength": 10 }, "password": { "type": "string", "minLength": 8 } }, "required": [ "token", "password" ], "additionalProperties": false }, "CategoriesResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "EQUIPMENT", "COMPONENT_TYPE" ] }, "name": { "type": "string" }, "isActive": { "type": "boolean" }, "usageCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "name", "isActive", "usageCount" ], "additionalProperties": false } } }, "required": [ "categories" ], "additionalProperties": false }, "Category": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "EQUIPMENT", "COMPONENT_TYPE" ] }, "name": { "type": "string" }, "isActive": { "type": "boolean" }, "usageCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "name", "isActive", "usageCount" ], "additionalProperties": false }, "CategoryCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "kind": { "type": "string", "enum": [ "EQUIPMENT", "COMPONENT_TYPE" ] }, "name": { "type": "string", "minLength": 1, "maxLength": 80 } }, "required": [ "kind", "name" ], "additionalProperties": false }, "CategoryUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "isActive": { "type": "boolean" } }, "additionalProperties": false }, "LocationsResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "locations": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "parentId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "address": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "guardianName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "guardianPhone": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "latitude": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "longitude": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "assetCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "name", "parentId", "address", "city", "guardianName", "guardianPhone", "latitude", "longitude", "assetCount" ], "additionalProperties": false } } }, "required": [ "locations" ], "additionalProperties": false }, "Location": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "parentId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "address": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "guardianName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "guardianPhone": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "latitude": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "longitude": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "assetCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "name", "parentId", "address", "city", "guardianName", "guardianPhone", "latitude", "longitude", "assetCount" ], "additionalProperties": false }, "LocationCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "parentId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "address": { "type": "string", "maxLength": 200 }, "city": { "type": "string", "maxLength": 80 }, "guardianName": { "type": "string", "maxLength": 120 }, "guardianPhone": { "type": "string", "maxLength": 40 }, "latitude": { "type": "number", "minimum": -90, "maximum": 90 }, "longitude": { "type": "number", "minimum": -180, "maximum": 180 } }, "required": [ "name" ], "additionalProperties": false }, "LocationUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "parentId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "address": { "type": "string", "maxLength": 200 }, "city": { "type": "string", "maxLength": 80 }, "guardianName": { "type": "string", "maxLength": 120 }, "guardianPhone": { "type": "string", "maxLength": 40 }, "latitude": { "type": "number", "minimum": -90, "maximum": 90 }, "longitude": { "type": "number", "minimum": -180, "maximum": 180 } }, "additionalProperties": false }, "AssetsResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "assets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "brand": { "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "serialNumber": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "commissionedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "loadKg": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "floors": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "IN_SERVICE", "OUT_OF_SERVICE", "UNDER_MAINTENANCE" ] }, "categoryId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "categoryName": { "type": "string" }, "locationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "locationName": { "type": "string" }, "siteName": { "type": "string" }, "componentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "reference", "brand", "model", "serialNumber", "commissionedAt", "loadKg", "floors", "status", "categoryId", "categoryName", "locationId", "locationName", "siteName", "componentCount" ], "additionalProperties": false } } }, "required": [ "assets" ], "additionalProperties": false }, "AssetOptionsResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "options": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "siteName": { "type": "string" } }, "required": [ "id", "reference", "siteName" ], "additionalProperties": false } } }, "required": [ "options" ], "additionalProperties": false }, "AssetDetail": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "brand": { "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "serialNumber": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "commissionedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "loadKg": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "floors": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "IN_SERVICE", "OUT_OF_SERVICE", "UNDER_MAINTENANCE" ] }, "categoryId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "categoryName": { "type": "string" }, "locationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "locationName": { "type": "string" }, "siteName": { "type": "string" }, "componentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "components": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "typeId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "typeName": { "type": "string" }, "designation": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "typeId", "typeName", "designation" ], "additionalProperties": false } } }, "required": [ "id", "reference", "brand", "model", "serialNumber", "commissionedAt", "loadKg", "floors", "status", "categoryId", "categoryName", "locationId", "locationName", "siteName", "componentCount", "components" ], "additionalProperties": false }, "AssetCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "reference": { "type": "string", "minLength": 1, "maxLength": 30 }, "brand": { "type": "string", "minLength": 1, "maxLength": 80 }, "model": { "type": "string", "maxLength": 80 }, "serialNumber": { "type": "string", "maxLength": 80 }, "commissionedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "loadKg": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "floors": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "categoryId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "locationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "components": { "type": "array", "items": { "type": "object", "properties": { "typeId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "designation": { "type": "string", "maxLength": 120 } }, "required": [ "typeId" ], "additionalProperties": false } } }, "required": [ "reference", "brand", "categoryId", "locationId" ], "additionalProperties": false }, "AssetUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "reference": { "type": "string", "minLength": 1, "maxLength": 30 }, "brand": { "type": "string", "minLength": 1, "maxLength": 80 }, "model": { "type": "string", "maxLength": 80 }, "serialNumber": { "type": "string", "maxLength": 80 }, "commissionedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "loadKg": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "floors": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "categoryId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "locationId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "string", "enum": [ "IN_SERVICE", "OUT_OF_SERVICE", "UNDER_MAINTENANCE" ] } }, "additionalProperties": false }, "AssetComponent": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "typeId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "typeName": { "type": "string" }, "designation": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "typeId", "typeName", "designation" ], "additionalProperties": false }, "AssetComponentCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "typeId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "designation": { "type": "string", "maxLength": 120 } }, "required": [ "typeId" ], "additionalProperties": false }, "TeamsResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "teams": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "members": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "roleName": { "type": "string" }, "initials": { "type": "string" } }, "required": [ "id", "displayName", "roleName", "initials" ], "additionalProperties": false } } }, "required": [ "id", "name", "description", "members" ], "additionalProperties": false } } }, "required": [ "teams" ], "additionalProperties": false }, "Team": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "members": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "roleName": { "type": "string" }, "initials": { "type": "string" } }, "required": [ "id", "displayName", "roleName", "initials" ], "additionalProperties": false } } }, "required": [ "id", "name", "description", "members" ], "additionalProperties": false }, "TeamCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "description": { "type": "string", "maxLength": 200 }, "memberIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "name" ], "additionalProperties": false }, "TeamUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "description": { "type": "string", "maxLength": 200 }, "memberIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "additionalProperties": false }, "UsersResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "displayName": { "type": "string" }, "phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "role": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "enum": [ "Administrateur", "Dispatcher", "Technicien", "Technicien limité", "Gestionnaire", "Demandeur", "Vue seule" ] } }, "required": [ "id", "name" ], "additionalProperties": false }, "teams": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" } }, "required": [ "id", "name" ], "additionalProperties": false } }, "status": { "type": "string", "enum": [ "active", "invited", "disabled" ] }, "isDemo": { "type": "boolean" }, "hourlyRate": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "id", "email", "displayName", "phone", "role", "teams", "status", "isDemo", "hourlyRate" ], "additionalProperties": false } } }, "required": [ "users" ], "additionalProperties": false }, "RolesResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "roles": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "enum": [ "Administrateur", "Dispatcher", "Technicien", "Technicien limité", "Gestionnaire", "Demandeur", "Vue seule" ] } }, "required": [ "id", "name" ], "additionalProperties": false } } }, "required": [ "roles" ], "additionalProperties": false }, "InvitationResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "activationToken": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "userId", "activationToken", "expiresAt" ], "additionalProperties": false }, "InvitationCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "displayName": { "type": "string", "minLength": 1, "maxLength": 120 }, "roleId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "teamIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "phone": { "type": "string", "maxLength": 40 } }, "required": [ "email", "displayName", "roleId" ], "additionalProperties": false }, "UserAdmin": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "displayName": { "type": "string" }, "phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "role": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "enum": [ "Administrateur", "Dispatcher", "Technicien", "Technicien limité", "Gestionnaire", "Demandeur", "Vue seule" ] } }, "required": [ "id", "name" ], "additionalProperties": false }, "teams": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" } }, "required": [ "id", "name" ], "additionalProperties": false } }, "status": { "type": "string", "enum": [ "active", "invited", "disabled" ] }, "isDemo": { "type": "boolean" }, "hourlyRate": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "id", "email", "displayName", "phone", "role", "teams", "status", "isDemo", "hourlyRate" ], "additionalProperties": false }, "UserUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": "string", "minLength": 1, "maxLength": 120 }, "phone": { "type": "string", "maxLength": 40 }, "roleId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "teamIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "isActive": { "type": "boolean" }, "hourlyRate": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "null" } ] } }, "additionalProperties": false }, "DocumentsResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "documents": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "NOTICE", "CERTIFICATE", "PHOTO", "OTHER" ] }, "fileName": { "type": "string" }, "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contentType": { "type": "string" }, "assetReference": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workOrderReference": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "uploadedByName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "kind", "fileName", "size", "contentType", "assetReference", "workOrderReference", "uploadedByName", "createdAt" ], "additionalProperties": false } } }, "required": [ "documents" ], "additionalProperties": false }, "Document": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "NOTICE", "CERTIFICATE", "PHOTO", "OTHER" ] }, "fileName": { "type": "string" }, "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contentType": { "type": "string" }, "assetReference": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workOrderReference": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "uploadedByName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "kind", "fileName", "size", "contentType", "assetReference", "workOrderReference", "uploadedByName", "createdAt" ], "additionalProperties": false }, "AnalyticsSummary": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "monthCost": { "type": "number" }, "previousMonthCost": { "type": "number" }, "closed12m": { "type": "object", "properties": { "total": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "preventive": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "total", "preventive" ], "additionalProperties": false }, "preventiveRate": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "avgResolutionDays": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "failuresByComponent": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string" }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "label", "count" ], "additionalProperties": false } }, "costsByMonth": { "type": "array", "items": { "type": "object", "properties": { "month": { "type": "string" }, "total": { "type": "number" } }, "required": [ "month", "total" ], "additionalProperties": false } }, "topAssets": { "type": "array", "items": { "type": "object", "properties": { "reference": { "type": "string" }, "siteName": { "type": "string" }, "correctives": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "partsCost": { "type": "number" }, "laborCost": { "type": "number" }, "total": { "type": "number" } }, "required": [ "reference", "siteName", "correctives", "partsCost", "laborCost", "total" ], "additionalProperties": false } } }, "required": [ "monthCost", "previousMonthCost", "closed12m", "preventiveRate", "avgResolutionDays", "failuresByComponent", "costsByMonth", "topAssets" ], "additionalProperties": false }, "PartnersResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "partners": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": [ "SUPPLIER", "CLIENT" ] }, "contactName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isActive": { "type": "boolean" }, "openOrders": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "name", "kind", "contactName", "phone", "email", "city", "isActive", "openOrders" ], "additionalProperties": false } } }, "required": [ "partners" ], "additionalProperties": false }, "Partner": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": [ "SUPPLIER", "CLIENT" ] }, "contactName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "city": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isActive": { "type": "boolean" }, "openOrders": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "name", "kind", "contactName", "phone", "email", "city", "isActive", "openOrders" ], "additionalProperties": false }, "PartnerCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "kind": { "type": "string", "enum": [ "SUPPLIER", "CLIENT" ] }, "contactName": { "type": "string", "maxLength": 120 }, "phone": { "type": "string", "maxLength": 40 }, "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "city": { "type": "string", "maxLength": 80 } }, "required": [ "name", "kind" ], "additionalProperties": false }, "PartnerUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "kind": { "type": "string", "enum": [ "SUPPLIER", "CLIENT" ] }, "contactName": { "type": "string", "maxLength": 120 }, "phone": { "type": "string", "maxLength": 40 }, "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "city": { "type": "string", "maxLength": 80 }, "isActive": { "type": "boolean" } }, "additionalProperties": false }, "PartsResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "parts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "designation": { "type": "string" }, "threshold": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "lastUnitPrice": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "compatible": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "supplierId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "supplierName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isActive": { "type": "boolean" }, "stock": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "belowThreshold": { "type": "boolean" } }, "required": [ "id", "reference", "designation", "threshold", "lastUnitPrice", "compatible", "supplierId", "supplierName", "isActive", "stock", "belowThreshold" ], "additionalProperties": false } } }, "required": [ "parts" ], "additionalProperties": false }, "PartDetail": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "designation": { "type": "string" }, "threshold": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "lastUnitPrice": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "compatible": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "supplierId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "supplierName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isActive": { "type": "boolean" }, "stock": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "belowThreshold": { "type": "boolean" }, "movements": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string", "enum": [ "RECEIPT", "ENTRY", "CONSUMPTION", "ADJUSTMENT" ] }, "quantity": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "unitPrice": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workOrderReference": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "purchaseOrderReference": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "byName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "kind", "quantity", "unitPrice", "reason", "workOrderReference", "purchaseOrderReference", "byName", "createdAt" ], "additionalProperties": false } } }, "required": [ "id", "reference", "designation", "threshold", "lastUnitPrice", "compatible", "supplierId", "supplierName", "isActive", "stock", "belowThreshold", "movements" ], "additionalProperties": false }, "PartCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "designation": { "type": "string", "minLength": 1, "maxLength": 200 }, "threshold": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "supplierId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "compatible": { "type": "string", "maxLength": 200 }, "initialPrice": { "type": "number", "exclusiveMinimum": 0 } }, "required": [ "designation" ], "additionalProperties": false }, "PartUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "designation": { "type": "string", "minLength": 1, "maxLength": 200 }, "threshold": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "supplierId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "compatible": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "isActive": { "type": "boolean" } }, "additionalProperties": false }, "StockMovementCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "kind": { "type": "string", "enum": [ "ENTRY", "ADJUSTMENT" ] }, "quantity": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "reason": { "type": "string", "maxLength": 300 } }, "required": [ "kind", "quantity" ], "additionalProperties": false }, "PurchaseOrdersResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "purchaseOrders": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "status": { "type": "string", "enum": [ "DRAFT", "SENT", "RECEIVED", "CANCELLED" ] }, "supplierId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "supplierName": { "type": "string" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "partId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "partReference": { "type": "string" }, "designation": { "type": "string" }, "quantity": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "unitPrice": { "type": "number" } }, "required": [ "id", "partId", "partReference", "designation", "quantity", "unitPrice" ], "additionalProperties": false } }, "total": { "type": "number" }, "sentAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "receivedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "reference", "status", "supplierId", "supplierName", "lines", "total", "sentAt", "receivedAt", "createdAt" ], "additionalProperties": false } } }, "required": [ "purchaseOrders" ], "additionalProperties": false }, "PurchaseOrder": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "status": { "type": "string", "enum": [ "DRAFT", "SENT", "RECEIVED", "CANCELLED" ] }, "supplierId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "supplierName": { "type": "string" }, "lines": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "partId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "partReference": { "type": "string" }, "designation": { "type": "string" }, "quantity": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "unitPrice": { "type": "number" } }, "required": [ "id", "partId", "partReference", "designation", "quantity", "unitPrice" ], "additionalProperties": false } }, "total": { "type": "number" }, "sentAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "receivedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "reference", "status", "supplierId", "supplierName", "lines", "total", "sentAt", "receivedAt", "createdAt" ], "additionalProperties": false }, "PurchaseOrderCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "supplierId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "lines": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "partId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "quantity": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "unitPrice": { "type": "number", "exclusiveMinimum": 0 } }, "required": [ "partId", "quantity", "unitPrice" ], "additionalProperties": false } } }, "required": [ "supplierId", "lines" ], "additionalProperties": false }, "PurchaseOrderTransition": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "to": { "type": "string", "enum": [ "SENT", "RECEIVED", "CANCELLED" ] } }, "required": [ "to" ], "additionalProperties": false }, "WorkOrderDetail": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string", "enum": [ "CORRECTIVE", "PREVENTIVE", "WORKS" ] }, "status": { "type": "string", "enum": [ "OPEN", "IN_PROGRESS", "ON_HOLD", "DONE", "CANCELLED" ] }, "priority": { "type": "string", "enum": [ "NONE", "LOW", "MEDIUM", "HIGH", "PERSON_TRAPPED" ] }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "assetReference": { "type": "string" }, "siteName": { "type": "string" }, "dueDate": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "assignees": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "initials": { "type": "string" } }, "required": [ "id", "displayName", "initials" ], "additionalProperties": false } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "locationName": { "type": "string" }, "startedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "completedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "cancelledAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "createdBy": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "initials": { "type": "string" } }, "required": [ "id", "displayName", "initials" ], "additionalProperties": false }, { "type": "null" } ] }, "request": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "requesterLabel": { "type": "string" } }, "required": [ "id", "reference", "requesterLabel" ], "additionalProperties": false }, { "type": "null" } ] }, "events": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "kind": { "type": "string" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "by": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "initials": { "type": "string" } }, "required": [ "id", "displayName", "initials" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "kind", "message", "by", "createdAt" ], "additionalProperties": false } }, "checklist": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" }, "state": { "type": "string", "enum": [ "PENDING", "DONE", "NA" ] }, "doneBy": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "initials": { "type": "string" } }, "required": [ "id", "displayName", "initials" ], "additionalProperties": false }, { "type": "null" } ] }, "doneAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] } }, "required": [ "id", "label", "state", "doneBy", "doneAt" ], "additionalProperties": false } }, "report": { "anyOf": [ { "type": "object", "properties": { "note": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "doorState": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" } }, "required": [ "id", "label" ], "additionalProperties": false }, { "type": "null" } ] }, "cabinPosition": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" } }, "required": [ "id", "label" ], "additionalProperties": false }, { "type": "null" } ] }, "anomaly": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" } }, "required": [ "id", "label" ], "additionalProperties": false }, { "type": "null" } ] }, "externalCause": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" } }, "required": [ "id", "label" ], "additionalProperties": false }, { "type": "null" } ] }, "actionTaken": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" } }, "required": [ "id", "label" ], "additionalProperties": false }, { "type": "null" } ] }, "componentConcerned": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" } }, "required": [ "id", "label" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "note", "doorState", "cabinPosition", "anomaly", "externalCause", "actionTaken", "componentConcerned" ], "additionalProperties": false }, { "type": "null" } ] }, "costs": { "type": "object", "properties": { "parts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "designation": { "type": "string" }, "quantity": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "unitPrice": { "type": "number" }, "total": { "type": "number" } }, "required": [ "id", "designation", "quantity", "unitPrice", "total" ], "additionalProperties": false } }, "labor": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "minutes": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "hourlyRate": { "type": "number" }, "total": { "type": "number" }, "note": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "displayName", "minutes", "hourlyRate", "total", "note" ], "additionalProperties": false } }, "total": { "type": "number" } }, "required": [ "parts", "labor", "total" ], "additionalProperties": false }, "allowedTransitions": { "type": "array", "items": { "type": "string", "enum": [ "OPEN", "IN_PROGRESS", "ON_HOLD", "DONE", "CANCELLED" ] } }, "closureBlockers": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "reference", "title", "type", "status", "priority", "assetId", "assetReference", "siteName", "dueDate", "assignees", "createdAt", "description", "locationName", "startedAt", "completedAt", "cancelledAt", "createdBy", "request", "events", "checklist", "report", "costs", "allowedTransitions", "closureBlockers" ], "additionalProperties": false }, "ConsumePart": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "partId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "quantity": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "partId", "quantity" ], "additionalProperties": false }, "LaborTimeCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "minutes": { "type": "integer", "exclusiveMinimum": 0, "maximum": 1440 }, "userId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "note": { "type": "string", "maxLength": 200 } }, "required": [ "minutes" ], "additionalProperties": false }, "PortalAsset": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "reference": { "type": "string" }, "siteName": { "type": "string" }, "locationName": { "type": "string" } }, "required": [ "reference", "siteName", "locationName" ], "additionalProperties": false }, "PortalRequestCreated": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "reference": { "type": "string" }, "description": { "type": "string" }, "isPersonTrapped": { "type": "boolean" }, "status": { "type": "string", "enum": [ "RECEIVED", "APPROVED", "REJECTED" ] }, "step": { "type": "string", "enum": [ "RECEIVED", "IN_PROGRESS", "RESOLVED" ] }, "rejectionReason": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "publicToken": { "type": "string" } }, "required": [ "reference", "description", "isPersonTrapped", "status", "step", "rejectionReason", "createdAt", "publicToken" ], "additionalProperties": false }, "PortalRequestCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "assetReference": { "type": "string", "minLength": 1, "maxLength": 30 }, "description": { "type": "string", "minLength": 3, "maxLength": 1000 }, "isPersonTrapped": { "type": "boolean" }, "requesterName": { "type": "string", "maxLength": 120 } }, "required": [ "assetReference", "description" ], "additionalProperties": false }, "PortalRequestStatus": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "reference": { "type": "string" }, "description": { "type": "string" }, "isPersonTrapped": { "type": "boolean" }, "status": { "type": "string", "enum": [ "RECEIVED", "APPROVED", "REJECTED" ] }, "step": { "type": "string", "enum": [ "RECEIVED", "IN_PROGRESS", "RESOLVED" ] }, "rejectionReason": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "reference", "description", "isPersonTrapped", "status", "step", "rejectionReason", "createdAt" ], "additionalProperties": false }, "TaskTemplatesResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "templates": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" }, "periodMonths": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "isRegulatory": { "type": "boolean" }, "isActive": { "type": "boolean" }, "componentTypeId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "componentTypeName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "label", "periodMonths", "isRegulatory", "isActive", "componentTypeId", "componentTypeName" ], "additionalProperties": false } } }, "required": [ "templates" ], "additionalProperties": false }, "TaskTemplate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" }, "periodMonths": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "isRegulatory": { "type": "boolean" }, "isActive": { "type": "boolean" }, "componentTypeId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "componentTypeName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "label", "periodMonths", "isRegulatory", "isActive", "componentTypeId", "componentTypeName" ], "additionalProperties": false }, "TaskTemplateCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "periodMonths": { "type": "integer", "minimum": 1, "maximum": 60 }, "componentTypeId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "isRegulatory": { "type": "boolean" } }, "required": [ "label", "periodMonths" ], "additionalProperties": false }, "TaskTemplateUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "periodMonths": { "type": "integer", "minimum": 1, "maximum": 60 }, "componentTypeId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "isRegulatory": { "type": "boolean" }, "isActive": { "type": "boolean" } }, "additionalProperties": false }, "PreventiveGenerationResult": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "month": { "type": "string" }, "created": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "skipped": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "firstControls": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "references": { "type": "array", "items": { "type": "string" } } }, "required": [ "month", "created", "skipped", "firstControls", "references" ], "additionalProperties": false }, "PreventiveGenerate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "month": { "type": "string", "pattern": "^\\d{4}-(0[1-9]|1[0-2])$" } }, "additionalProperties": false }, "PreventiveStatus": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "month": { "type": "string" }, "assetsUnderContract": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "generated": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "done": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "late": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "firstControls": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "month", "assetsUnderContract", "generated", "done", "late", "firstControls" ], "additionalProperties": false }, "MetersResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "meters": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "RUNNING_HOURS", "STARTS" ] }, "readings": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "value": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "readBy": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" } }, "required": [ "id", "displayName" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "value", "readBy", "createdAt" ], "additionalProperties": false } } }, "required": [ "kind", "readings" ], "additionalProperties": false } } }, "required": [ "meters" ], "additionalProperties": false }, "MeterReadingCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "kind": { "type": "string", "enum": [ "RUNNING_HOURS", "STARTS" ] }, "value": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "kind", "value" ], "additionalProperties": false }, "WorkOrdersResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "workOrders": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string", "enum": [ "CORRECTIVE", "PREVENTIVE", "WORKS" ] }, "status": { "type": "string", "enum": [ "OPEN", "IN_PROGRESS", "ON_HOLD", "DONE", "CANCELLED" ] }, "priority": { "type": "string", "enum": [ "NONE", "LOW", "MEDIUM", "HIGH", "PERSON_TRAPPED" ] }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "assetReference": { "type": "string" }, "siteName": { "type": "string" }, "dueDate": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] }, "assignees": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "initials": { "type": "string" } }, "required": [ "id", "displayName", "initials" ], "additionalProperties": false } }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "reference", "title", "type", "status", "priority", "assetId", "assetReference", "siteName", "dueDate", "assignees", "createdAt" ], "additionalProperties": false } } }, "required": [ "workOrders" ], "additionalProperties": false }, "WorkOrderCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "description": { "type": "string", "maxLength": 2000 }, "type": { "type": "string", "enum": [ "CORRECTIVE", "PREVENTIVE", "WORKS" ] }, "priority": { "type": "string", "enum": [ "NONE", "LOW", "MEDIUM", "HIGH", "PERSON_TRAPPED" ] }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "dueDate": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "assigneeIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "title", "type", "assetId" ], "additionalProperties": false }, "TransitionRequest": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "to": { "type": "string", "enum": [ "OPEN", "IN_PROGRESS", "ON_HOLD", "DONE", "CANCELLED" ] }, "comment": { "type": "string", "maxLength": 500 } }, "required": [ "to" ], "additionalProperties": false }, "CommentCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "message": { "type": "string", "minLength": 1, "maxLength": 1000 } }, "required": [ "message" ], "additionalProperties": false }, "AssigneesUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "assigneeIds": { "maxItems": 10, "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "assigneeIds" ], "additionalProperties": false }, "ReportUpsert": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "note": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ] }, "doorStateId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "cabinPositionId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "anomalyId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "externalCauseId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "actionTakenId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "componentConcernedId": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] } }, "additionalProperties": false }, "ChecklistItem": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string" }, "state": { "type": "string", "enum": [ "PENDING", "DONE", "NA" ] }, "doneBy": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "displayName": { "type": "string" }, "initials": { "type": "string" } }, "required": [ "id", "displayName", "initials" ], "additionalProperties": false }, { "type": "null" } ] }, "doneAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, { "type": "null" } ] } }, "required": [ "id", "label", "state", "doneBy", "doneAt" ], "additionalProperties": false }, "ChecklistPatch": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "state": { "type": "string", "enum": [ "PENDING", "DONE", "NA" ] } }, "required": [ "state" ], "additionalProperties": false }, "RequestsResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "requests": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "description": { "type": "string" }, "isPersonTrapped": { "type": "boolean" }, "status": { "type": "string", "enum": [ "RECEIVED", "APPROVED", "REJECTED" ] }, "rejectionReason": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "assetReference": { "type": "string" }, "siteName": { "type": "string" }, "requesterLabel": { "type": "string" }, "workOrder": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "status": { "type": "string", "enum": [ "OPEN", "IN_PROGRESS", "ON_HOLD", "DONE", "CANCELLED" ] } }, "required": [ "id", "reference", "status" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "reference", "description", "isPersonTrapped", "status", "rejectionReason", "assetId", "assetReference", "siteName", "requesterLabel", "workOrder", "createdAt" ], "additionalProperties": false } } }, "required": [ "requests" ], "additionalProperties": false }, "RequestSummary": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "description": { "type": "string" }, "isPersonTrapped": { "type": "boolean" }, "status": { "type": "string", "enum": [ "RECEIVED", "APPROVED", "REJECTED" ] }, "rejectionReason": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "assetReference": { "type": "string" }, "siteName": { "type": "string" }, "requesterLabel": { "type": "string" }, "workOrder": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "reference": { "type": "string" }, "status": { "type": "string", "enum": [ "OPEN", "IN_PROGRESS", "ON_HOLD", "DONE", "CANCELLED" ] } }, "required": [ "id", "reference", "status" ], "additionalProperties": false }, { "type": "null" } ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": [ "id", "reference", "description", "isPersonTrapped", "status", "rejectionReason", "assetId", "assetReference", "siteName", "requesterLabel", "workOrder", "createdAt" ], "additionalProperties": false }, "RequestCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "description": { "type": "string", "minLength": 1, "maxLength": 2000 }, "isPersonTrapped": { "type": "boolean" } }, "required": [ "assetId", "description" ], "additionalProperties": false }, "RequestApprove": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "priority": { "type": "string", "enum": [ "NONE", "LOW", "MEDIUM", "HIGH", "PERSON_TRAPPED" ] }, "assigneeIds": { "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "dueDate": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "additionalProperties": false }, "RequestReject": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "reason": { "type": "string", "minLength": 3, "maxLength": 500 } }, "required": [ "reason" ], "additionalProperties": false }, "ReferenceValuesResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "referenceValues": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "field": { "type": "string", "enum": [ "DOOR_STATE", "CABIN_POSITION", "ANOMALY", "EXTERNAL_CAUSE", "ACTION_TAKEN", "COMPONENT_CONCERNED" ] }, "label": { "type": "string" }, "isActive": { "type": "boolean" }, "usageCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "field", "label", "isActive", "usageCount" ], "additionalProperties": false } } }, "required": [ "referenceValues" ], "additionalProperties": false }, "ReferenceValue": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "field": { "type": "string", "enum": [ "DOOR_STATE", "CABIN_POSITION", "ANOMALY", "EXTERNAL_CAUSE", "ACTION_TAKEN", "COMPONENT_CONCERNED" ] }, "label": { "type": "string" }, "isActive": { "type": "boolean" }, "usageCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "id", "field", "label", "isActive", "usageCount" ], "additionalProperties": false }, "ReferenceValueCreate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "field": { "type": "string", "enum": [ "DOOR_STATE", "CABIN_POSITION", "ANOMALY", "EXTERNAL_CAUSE", "ACTION_TAKEN", "COMPONENT_CONCERNED" ] }, "label": { "type": "string", "minLength": 1, "maxLength": 120 } }, "required": [ "field", "label" ], "additionalProperties": false }, "ReferenceValueUpdate": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 120 }, "isActive": { "type": "boolean" } }, "additionalProperties": false }, "HealthResponse": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok", "degraded" ] }, "services": { "type": "object", "properties": { "database": { "type": "string", "enum": [ "up", "down" ] }, "redis": { "type": "string", "enum": [ "up", "down" ] }, "storage": { "type": "string", "enum": [ "up", "down" ] } }, "required": [ "database", "redis", "storage" ], "additionalProperties": false } }, "required": [ "status", "services" ], "additionalProperties": false } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } } }