Files
siop2/docs/openapi.json
pr-daaif c9168ece16 feat(r6): R6.6 — Demandeur restreint à son site
Trouvé en recette : GET /assets/options n'avait aucun filtre — tout
Demandeur voyait le parc complet dans le sélecteur d'équipement de
"Nouvelle demande", sur le web ET le mobile (même endpoint partagé).
Risque réel : signaler accidentellement une panne sur un ascenseur qu'on
ne gère pas.

Corrigé à la racine, sur les deux plateformes à la fois :

- Relation many-to-many User↔Location (assignedSites/assignedUsers,
  migration r6_demandeur_sites, même style que Team.members) — vide =
  aucune restriction, comportement historique inchangé pour tous les
  rôles sauf un Demandeur affecté à un site.
- AssetsService.allowedLocationIds(user) : sites + zones filles
  autorisés, ou null si aucune restriction — réutilisée par options()
  ET par RequestsService.create (défense en profondeur : un assetId
  soumis directement hors périmètre est rejeté, 400).
- UsersService : assertTopLevelSites (un Demandeur est affecté à un
  site, jamais une zone) ; invite()/update() branchent locationIds
  (remplace l'affectation, comme teamIds).
- Web (personnes.tsx) : ModaleInvitation affiche les sites à cocher pour
  un rôle Demandeur ; colonne "Sites" éditable via une modale dédiée.
- Mobile (formulaire-demande.tsx) : bouton "Scanner l'étiquette" en
  raccourci — résout uniquement contre les options déjà chargées (déjà
  filtrées), jamais de repli sur le parc complet qui annulerait la
  restriction. Aucun changement à useAssetOptions() : le filtrage
  serveur profite automatiquement au formulaire mobile.
- Seed : Karim Doukkali (démo) rattaché à Tour Atlas.

Bug trouvé en vérification avant tout commit : create() comparait
allowed.includes(dto.assetId), mais allowed est une liste d'ids de
sites/zones, pas d'ids d'appareils — aurait rejeté à tort tout
signalement d'un Demandeur affecté, y compris dans son propre périmètre.
Corrigé (comparaison sur asset.locationId) ; méthode renommée
allowedAssetIds → allowedLocationIds pour que le nom dise ce qu'elle
retourne.

exploitation.e2e-spec.ts mis à jour (A1/C1 → A2/B1, dans le site de
Karim — sinon rejetés par la nouvelle règle, comportement voulu).
79/80 tests API verts, le seul échec (documents-analytics, monthCost)
est le flake calendaire déjà identifié cette session, sans rapport.
Typecheck/tests/lint verts sur les 4 paquets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-02 20:22:50 +01:00

8843 lines
254 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"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 nest 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 nest 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 nest 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 dorganes)",
"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 larbre)",
"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 dappareils 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 demplacement 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 nest pas un type dorgane"
}
}
}
},
"/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 linvitation)",
"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 dactivation (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 dactivation dun 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 lAPI (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}/corpus": {
"patch": {
"operationId": "updateDocumentCorpus",
"summary": "Inclure/exclure du corpus IA (D3 — réversible, effectif à la prochaine réindexation)",
"tags": [
"documents"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DocumentCorpusUpdate"
}
}
}
},
"responses": {
"200": {
"description": "Document mis à jour",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Document"
}
}
}
},
"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"
],
"parameters": [
{
"name": "months",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Synthèse",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnalyticsSummary"
}
}
}
}
}
}
},
"/assistant/ask": {
"post": {
"operationId": "askAssistant",
"summary": "Assistant R5 — sourcé ou silencieux : extraits cités ou refus honnête (D2)",
"tags": [
"assistant"
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssistantAsk"
}
}
}
},
"responses": {
"200": {
"description": "Réponse sourcée ou refus",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssistantAnswer"
}
}
}
},
"503": {
"description": "Service IA indisponible"
}
}
}
},
"/assistant/suggest-bilan": {
"post": {
"operationId": "suggestBilan",
"summary": "Suggérer des codes de bilan depuis une description libre (D1 — lhumain valide)",
"tags": [
"assistant"
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuggestBilan"
}
}
}
},
"responses": {
"200": {
"description": "Suggestions (codes existants seulement)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BilanSuggestions"
}
}
}
},
"503": {
"description": "Service IA indisponible"
}
}
}
},
"/assistant/reindex": {
"post": {
"operationId": "reindexAssistant",
"summary": "Réindexer le corpus (bibliothèque PDF + bilans clôturés, anonymisés à lingestion — D4)",
"tags": [
"assistant"
],
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Bilan dindexation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReindexResult"
}
}
}
},
"503": {
"description": "Service IA indisponible"
}
}
}
},
"/assistant/transcribe": {
"post": {
"operationId": "transcribeAudio",
"summary": "Dictée (R5 D5, opt-in) — laudio est transcrit puis JAMAIS conservé, à relire avant tout usage",
"tags": [
"assistant"
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary"
}
},
"required": [
"file"
]
}
}
}
},
"responses": {
"200": {
"description": "Texte transcrit — à relire (D1)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TranscriptionResult"
}
}
}
},
"503": {
"description": "Dictée non activée ou service IA indisponible"
}
}
}
},
"/search": {
"get": {
"operationId": "globalSearch",
"summary": "Recherche globale (OT, ascenseurs, sites) — chaque famille filtrée par la matrice",
"tags": [
"search"
],
"parameters": [
{
"name": "q",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Résultats (5 max par famille)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SearchResponse"
}
}
}
}
}
}
},
"/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 lOT — 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 lappareil (relevés récents dabord)",
"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 lOT 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"
}
]
},
"partnerId": {
"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"
}
]
},
"partnerName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"assetCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"name",
"parentId",
"address",
"city",
"guardianName",
"guardianPhone",
"latitude",
"longitude",
"partnerId",
"partnerName",
"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"
}
]
},
"partnerId": {
"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"
}
]
},
"partnerName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"assetCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"name",
"parentId",
"address",
"city",
"guardianName",
"guardianPhone",
"latitude",
"longitude",
"partnerId",
"partnerName",
"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
},
"partnerId": {
"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"
}
]
}
},
"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
},
"partnerId": {
"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
},
"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"
}
]
},
"assignedSites": {
"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
}
}
},
"required": [
"id",
"email",
"displayName",
"phone",
"role",
"teams",
"status",
"isDemo",
"hourlyRate",
"assignedSites"
],
"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
},
"locationIds": {
"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": [
"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"
}
]
},
"assignedSites": {
"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
}
}
},
"required": [
"id",
"email",
"displayName",
"phone",
"role",
"teams",
"status",
"isDemo",
"hourlyRate",
"assignedSites"
],
"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"
}
]
},
"locationIds": {
"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
},
"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))$"
},
"inCorpus": {
"type": "boolean"
},
"indexedAt": {
"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"
}
]
},
"chunkCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"kind",
"fileName",
"size",
"contentType",
"assetReference",
"workOrderReference",
"uploadedByName",
"createdAt",
"inCorpus",
"indexedAt",
"chunkCount"
],
"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))$"
},
"inCorpus": {
"type": "boolean"
},
"indexedAt": {
"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"
}
]
},
"chunkCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"kind",
"fileName",
"size",
"contentType",
"assetReference",
"workOrderReference",
"uploadedByName",
"createdAt",
"inCorpus",
"indexedAt",
"chunkCount"
],
"additionalProperties": false
},
"DocumentCorpusUpdate": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"inCorpus": {
"type": "boolean"
}
},
"required": [
"inCorpus"
],
"additionalProperties": false
},
"AnalyticsSummary": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"months": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"monthCost": {
"type": "number"
},
"previousMonthCost": {
"type": "number"
},
"closed": {
"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": [
"months",
"monthCost",
"previousMonthCost",
"closed",
"preventiveRate",
"avgResolutionDays",
"failuresByComponent",
"costsByMonth",
"topAssets"
],
"additionalProperties": false
},
"AssistantAnswer": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"EXTRACTIVE",
"GENERATED",
"REFUSAL"
]
},
"answer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"excerpts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sourceType": {
"type": "string",
"enum": [
"DOCUMENT",
"WORK_ORDER"
]
},
"documentId": {
"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"
}
]
},
"workOrderId": {
"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"
}
]
},
"title": {
"type": "string"
},
"locator": {
"type": "string"
},
"content": {
"type": "string"
},
"score": {
"type": "number"
}
},
"required": [
"sourceType",
"documentId",
"workOrderId",
"title",
"locator",
"content",
"score"
],
"additionalProperties": false
}
},
"corpus": {
"type": "object",
"properties": {
"documents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"reports": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"documents",
"reports"
],
"additionalProperties": false
}
},
"required": [
"mode",
"answer",
"excerpts",
"corpus"
],
"additionalProperties": false
},
"AssistantAsk": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"question": {
"type": "string",
"minLength": 3,
"maxLength": 500
}
},
"required": [
"question"
],
"additionalProperties": false
},
"BilanSuggestions": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"suggestions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"enum": [
"DOOR_STATE",
"CABIN_POSITION",
"ANOMALY",
"EXTERNAL_CAUSE",
"ACTION_TAKEN",
"COMPONENT_CONCERNED"
]
},
"valueId": {
"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"
},
"confidence": {
"type": "string",
"enum": [
"HIGH",
"MEDIUM"
]
},
"similarReports": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"score": {
"type": "number"
}
},
"required": [
"field",
"valueId",
"label",
"confidence",
"similarReports",
"score"
],
"additionalProperties": false
}
}
},
"required": [
"suggestions"
],
"additionalProperties": false
},
"SuggestBilan": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 10,
"maxLength": 2000
}
},
"required": [
"description"
],
"additionalProperties": false
},
"ReindexResult": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"documentsIndexed": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"documentsSkipped": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"reportsIndexed": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"chunks": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"documentsIndexed",
"documentsSkipped",
"reportsIndexed",
"chunks"
],
"additionalProperties": false
},
"TranscriptionResult": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"text": {
"type": "string"
}
},
"required": [
"text"
],
"additionalProperties": false
},
"SearchResponse": {
"$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"
},
"status": {
"type": "string",
"enum": [
"OPEN",
"IN_PROGRESS",
"ON_HOLD",
"DONE",
"CANCELLED"
]
}
},
"required": [
"id",
"reference",
"title",
"status"
],
"additionalProperties": false
}
},
"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"
}
]
},
"siteName": {
"type": "string"
}
},
"required": [
"id",
"reference",
"brand",
"model",
"siteName"
],
"additionalProperties": false
}
},
"sites": {
"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"
},
"city": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"city"
],
"additionalProperties": false
}
}
},
"required": [
"workOrders",
"assets",
"sites"
],
"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
},
"siteNames": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"name",
"kind",
"contactName",
"phone",
"email",
"city",
"isActive",
"openOrders",
"siteNames"
],
"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
},
"siteNames": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"name",
"kind",
"contactName",
"phone",
"email",
"city",
"isActive",
"openOrders",
"siteNames"
],
"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"
}
},
"updatedAt": {
"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",
"description",
"locationName",
"startedAt",
"completedAt",
"cancelledAt",
"createdBy",
"request",
"events",
"checklist",
"report",
"costs",
"allowedTransitions",
"closureBlockers",
"updatedAt"
],
"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
},
"baseUpdatedAt": {
"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": [
"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"
}
]
},
"baseUpdatedAt": {
"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
},
"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"
]
},
"baseUpdatedAt": {
"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": [
"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"
}
}
}
}