mirror of
https://github.com/siop-spelev/siop2.git
synced 2026-08-08 12:41:54 +00:00
- migration r1_referentiel : Category (EQUIPMENT/COMPONENT_TYPE), Location (site → zone, lat/lng + colonne PostGIS générée geography(Point,4326) + index GIST), Asset (statut d'équipement), AssetComponent (organe sans emplacement PAR CONSTRUCTION), Team, invitation sur User ; migration autosuffisante (CREATE EXTENSION IF NOT EXISTS postgis) - contrat : 21 nouvelles opérations (26 total), générateur OpenAPI étendu aux paramètres de chemin ; spec + client web régénérés dans ce commit - API : modules categories/locations/assets/teams + gestion des personnes (liste, rôles, invitation lien 7 j à usage unique, activation publique qui connecte directement, mise à jour rôle/équipes) — tout sous @RequirePermission ; invariants en service (profondeur 2, kinds, catégorie jamais supprimée) - seed : parc de la maquette validée (5 sites + 8 zones, 8 appareils, organes A1/B2, 9 catégories, 2 équipes) — idempotent - 36 tests verts (couverture 96 % stmts / 85 % branches) : recette site→zone→appareil→organes, matrice vivante, invitation→activation ; smoke test sur build de prod - CI : postgres → postgis/postgis:18-3.6 (la migration R1 l'exige) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2745 lines
77 KiB
JSON
2745 lines
77 KiB
JSON
{
|
||
"openapi": "3.1.0",
|
||
"info": {
|
||
"title": "SIOP V2 API",
|
||
"version": "0.1.0",
|
||
"description": "GMAO ascenseurs — contrat R0 (auth, démo-login ADR-002, profil, santé). Généré depuis packages/shared/src/contract.ts — NE PAS ÉDITER À LA MAIN."
|
||
},
|
||
"paths": {
|
||
"/auth/login": {
|
||
"post": {
|
||
"operationId": "login",
|
||
"summary": "Connexion par e-mail et mot de passe",
|
||
"tags": [
|
||
"auth"
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/LoginRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Jeton émis",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AuthResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Identifiants invalides ou compte inactif"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/auth/demo-accounts": {
|
||
"get": {
|
||
"operationId": "listDemoAccounts",
|
||
"summary": "Comptes de démonstration (ADR-002 — jamais de secret)",
|
||
"tags": [
|
||
"auth",
|
||
"demo"
|
||
],
|
||
"x-demo-only": true,
|
||
"description": "ADR-002 : cette route est absente (404) quand DEMO_MODE n’est pas actif.",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Comptes isDemo actifs",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/DemoAccountsResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/auth/demo-login": {
|
||
"post": {
|
||
"operationId": "demoLogin",
|
||
"summary": "Connexion 1 clic sur un compte de démonstration (ADR-002)",
|
||
"tags": [
|
||
"auth",
|
||
"demo"
|
||
],
|
||
"x-demo-only": true,
|
||
"description": "ADR-002 : cette route est absente (404) quand DEMO_MODE n’est pas actif.",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/DemoLoginRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Jeton émis",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AuthResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Le compte n’est pas un compte de démonstration"
|
||
},
|
||
"404": {
|
||
"description": "Compte inconnu"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users/me": {
|
||
"get": {
|
||
"operationId": "getMe",
|
||
"summary": "Profil courant + matrice de permissions du rôle",
|
||
"tags": [
|
||
"users"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Profil",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/MeResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Non authentifié"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/auth/activate": {
|
||
"post": {
|
||
"operationId": "activateAccount",
|
||
"summary": "Activer un compte invité (lien 7 jours) — connecte directement",
|
||
"tags": [
|
||
"auth"
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ActivateRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Compte activé et connecté",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AuthResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Lien invalide ou expiré"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/categories": {
|
||
"get": {
|
||
"operationId": "listCategories",
|
||
"summary": "Référentiels administrables (catégories d’équipement, types d’organes)",
|
||
"tags": [
|
||
"categories"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Liste",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CategoriesResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"operationId": "createCategory",
|
||
"summary": "Ajouter une catégorie",
|
||
"tags": [
|
||
"categories"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CategoryCreate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Créée",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Category"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Nom déjà utilisé pour ce type"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/categories/{id}": {
|
||
"patch": {
|
||
"operationId": "updateCategory",
|
||
"summary": "Renommer ou (dés)activer — jamais de suppression si utilisée",
|
||
"tags": [
|
||
"categories"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CategoryUpdate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Mise à jour",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Category"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Inconnue"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/locations": {
|
||
"get": {
|
||
"operationId": "listLocations",
|
||
"summary": "Sites et zones (liste plate, le client construit l’arbre)",
|
||
"tags": [
|
||
"locations"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Liste",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/LocationsResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"operationId": "createLocation",
|
||
"summary": "Créer un site (sans parent) ou une zone (profondeur max 2)",
|
||
"tags": [
|
||
"locations"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/LocationCreate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Créé",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Location"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Hiérarchie trop profonde"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/locations/{id}": {
|
||
"patch": {
|
||
"operationId": "updateLocation",
|
||
"summary": "Modifier un emplacement",
|
||
"tags": [
|
||
"locations"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/LocationUpdate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Mis à jour",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Location"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Inconnu"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/assets": {
|
||
"get": {
|
||
"operationId": "listAssets",
|
||
"summary": "Inventaire des appareils",
|
||
"tags": [
|
||
"assets"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Liste",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AssetsResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"operationId": "createAsset",
|
||
"summary": "Créer un appareil (avec ses organes) — le QR découle de la référence",
|
||
"tags": [
|
||
"assets"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AssetCreate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Créé",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AssetDetail"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Référence déjà utilisée"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/assets/{id}": {
|
||
"get": {
|
||
"operationId": "getAsset",
|
||
"summary": "Fiche appareil (identité + organes)",
|
||
"tags": [
|
||
"assets"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Fiche",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AssetDetail"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Inconnu"
|
||
}
|
||
}
|
||
},
|
||
"patch": {
|
||
"operationId": "updateAsset",
|
||
"summary": "Modifier un appareil (dont son statut d’équipement)",
|
||
"tags": [
|
||
"assets"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AssetUpdate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Mis à jour",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AssetDetail"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Inconnu"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/assets/{id}/components": {
|
||
"post": {
|
||
"operationId": "addAssetComponent",
|
||
"summary": "Ajouter un organe (jamais d’emplacement propre)",
|
||
"tags": [
|
||
"assets"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AssetComponentCreate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Ajouté",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AssetComponent"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Le type choisi n’est pas un type d’organe"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/assets/{id}/components/{componentId}": {
|
||
"delete": {
|
||
"operationId": "removeAssetComponent",
|
||
"summary": "Retirer un organe",
|
||
"tags": [
|
||
"assets"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
},
|
||
{
|
||
"name": "componentId",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "Retiré"
|
||
},
|
||
"404": {
|
||
"description": "Inconnu"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/teams": {
|
||
"get": {
|
||
"operationId": "listTeams",
|
||
"summary": "Équipes et leurs membres",
|
||
"tags": [
|
||
"teams"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Liste",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TeamsResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"operationId": "createTeam",
|
||
"summary": "Créer une équipe",
|
||
"tags": [
|
||
"teams"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TeamCreate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Créée",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Team"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Nom déjà utilisé"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/teams/{id}": {
|
||
"patch": {
|
||
"operationId": "updateTeam",
|
||
"summary": "Modifier une équipe (nom, description, membres)",
|
||
"tags": [
|
||
"teams"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TeamUpdate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Mise à jour",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Team"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Inconnue"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users": {
|
||
"get": {
|
||
"operationId": "listUsers",
|
||
"summary": "Personnes (statut dérivé : actif / invité / désactivé)",
|
||
"tags": [
|
||
"users"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Liste",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UsersResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/roles": {
|
||
"get": {
|
||
"operationId": "listRoles",
|
||
"summary": "Les 7 rôles (pour l’invitation)",
|
||
"tags": [
|
||
"users"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Liste",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/RolesResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users/invitations": {
|
||
"post": {
|
||
"operationId": "inviteUser",
|
||
"summary": "Inviter — crée le compte inactif et émet le lien d’activation (7 j)",
|
||
"tags": [
|
||
"users"
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/InvitationCreate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "Invitation émise",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/InvitationResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Email déjà utilisé"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users/{id}/invitation": {
|
||
"post": {
|
||
"operationId": "resendInvitation",
|
||
"summary": "Régénérer le lien d’activation d’un compte non activé",
|
||
"tags": [
|
||
"users"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Nouveau lien",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/InvitationResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "Compte déjà activé"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users/{id}": {
|
||
"patch": {
|
||
"operationId": "updateUser",
|
||
"summary": "Modifier une personne (rôle, équipes, activation du compte)",
|
||
"tags": [
|
||
"users"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"bearerAuth": []
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UserUpdate"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Mise à jour",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/UserAdmin"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Inconnue"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/health": {
|
||
"get": {
|
||
"operationId": "getHealth",
|
||
"summary": "État des dépendances (base, Redis, stockage)",
|
||
"tags": [
|
||
"health"
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "État agrégé",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HealthResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"components": {
|
||
"schemas": {
|
||
"AuthResponse": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"accessToken": {
|
||
"type": "string"
|
||
},
|
||
"user": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"email": {
|
||
"type": "string",
|
||
"format": "email",
|
||
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"role": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"enum": [
|
||
"Administrateur",
|
||
"Dispatcher",
|
||
"Technicien",
|
||
"Technicien limité",
|
||
"Gestionnaire",
|
||
"Demandeur",
|
||
"Vue seule"
|
||
]
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"name"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"isDemo": {
|
||
"type": "boolean"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"email",
|
||
"displayName",
|
||
"role",
|
||
"isDemo"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
},
|
||
"required": [
|
||
"accessToken",
|
||
"user"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"LoginRequest": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"email": {
|
||
"type": "string",
|
||
"format": "email",
|
||
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
||
},
|
||
"password": {
|
||
"type": "string",
|
||
"minLength": 1
|
||
}
|
||
},
|
||
"required": [
|
||
"email",
|
||
"password"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"DemoAccountsResponse": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"accounts": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"roleName": {
|
||
"type": "string",
|
||
"enum": [
|
||
"Administrateur",
|
||
"Dispatcher",
|
||
"Technicien",
|
||
"Technicien limité",
|
||
"Gestionnaire",
|
||
"Demandeur",
|
||
"Vue seule"
|
||
]
|
||
},
|
||
"initials": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 3
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"displayName",
|
||
"roleName",
|
||
"initials"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"accounts"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"DemoLoginRequest": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"userId": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
}
|
||
},
|
||
"required": [
|
||
"userId"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"MeResponse": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"email": {
|
||
"type": "string",
|
||
"format": "email",
|
||
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"role": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"enum": [
|
||
"Administrateur",
|
||
"Dispatcher",
|
||
"Technicien",
|
||
"Technicien limité",
|
||
"Gestionnaire",
|
||
"Demandeur",
|
||
"Vue seule"
|
||
]
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"name"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"isDemo": {
|
||
"type": "boolean"
|
||
},
|
||
"permissions": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"objectCategory": {
|
||
"type": "string",
|
||
"enum": [
|
||
"WORK_ORDERS",
|
||
"REQUESTS",
|
||
"ASSETS",
|
||
"LOCATIONS",
|
||
"METERS",
|
||
"PARTS",
|
||
"PURCHASE_ORDERS",
|
||
"PEOPLE_TEAMS",
|
||
"ANALYTICS",
|
||
"SETTINGS"
|
||
]
|
||
},
|
||
"canView": {
|
||
"type": "boolean"
|
||
},
|
||
"canViewOther": {
|
||
"type": "boolean"
|
||
},
|
||
"canCreate": {
|
||
"type": "boolean"
|
||
},
|
||
"canEdit": {
|
||
"type": "boolean"
|
||
},
|
||
"canDelete": {
|
||
"type": "boolean"
|
||
}
|
||
},
|
||
"required": [
|
||
"objectCategory",
|
||
"canView",
|
||
"canViewOther",
|
||
"canCreate",
|
||
"canEdit",
|
||
"canDelete"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"email",
|
||
"displayName",
|
||
"role",
|
||
"isDemo",
|
||
"permissions"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"ActivateRequest": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"token": {
|
||
"type": "string",
|
||
"minLength": 10
|
||
},
|
||
"password": {
|
||
"type": "string",
|
||
"minLength": 8
|
||
}
|
||
},
|
||
"required": [
|
||
"token",
|
||
"password"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"CategoriesResponse": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"categories": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"kind": {
|
||
"type": "string",
|
||
"enum": [
|
||
"EQUIPMENT",
|
||
"COMPONENT_TYPE"
|
||
]
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"isActive": {
|
||
"type": "boolean"
|
||
},
|
||
"usageCount": {
|
||
"type": "integer",
|
||
"minimum": -9007199254740991,
|
||
"maximum": 9007199254740991
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"kind",
|
||
"name",
|
||
"isActive",
|
||
"usageCount"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"categories"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"Category": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"kind": {
|
||
"type": "string",
|
||
"enum": [
|
||
"EQUIPMENT",
|
||
"COMPONENT_TYPE"
|
||
]
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"isActive": {
|
||
"type": "boolean"
|
||
},
|
||
"usageCount": {
|
||
"type": "integer",
|
||
"minimum": -9007199254740991,
|
||
"maximum": 9007199254740991
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"kind",
|
||
"name",
|
||
"isActive",
|
||
"usageCount"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"CategoryCreate": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"kind": {
|
||
"type": "string",
|
||
"enum": [
|
||
"EQUIPMENT",
|
||
"COMPONENT_TYPE"
|
||
]
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 80
|
||
}
|
||
},
|
||
"required": [
|
||
"kind",
|
||
"name"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"CategoryUpdate": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 80
|
||
},
|
||
"isActive": {
|
||
"type": "boolean"
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"LocationsResponse": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"locations": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"parentId": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"address": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"city": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"guardianName": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"guardianPhone": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"latitude": {
|
||
"anyOf": [
|
||
{
|
||
"type": "number"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"longitude": {
|
||
"anyOf": [
|
||
{
|
||
"type": "number"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"assetCount": {
|
||
"type": "integer",
|
||
"minimum": -9007199254740991,
|
||
"maximum": 9007199254740991
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"name",
|
||
"parentId",
|
||
"address",
|
||
"city",
|
||
"guardianName",
|
||
"guardianPhone",
|
||
"latitude",
|
||
"longitude",
|
||
"assetCount"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"locations"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"Location": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"parentId": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"address": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"city": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"guardianName": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"guardianPhone": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"latitude": {
|
||
"anyOf": [
|
||
{
|
||
"type": "number"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"longitude": {
|
||
"anyOf": [
|
||
{
|
||
"type": "number"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"assetCount": {
|
||
"type": "integer",
|
||
"minimum": -9007199254740991,
|
||
"maximum": 9007199254740991
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"name",
|
||
"parentId",
|
||
"address",
|
||
"city",
|
||
"guardianName",
|
||
"guardianPhone",
|
||
"latitude",
|
||
"longitude",
|
||
"assetCount"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"LocationCreate": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 120
|
||
},
|
||
"parentId": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"address": {
|
||
"type": "string",
|
||
"maxLength": 200
|
||
},
|
||
"city": {
|
||
"type": "string",
|
||
"maxLength": 80
|
||
},
|
||
"guardianName": {
|
||
"type": "string",
|
||
"maxLength": 120
|
||
},
|
||
"guardianPhone": {
|
||
"type": "string",
|
||
"maxLength": 40
|
||
},
|
||
"latitude": {
|
||
"type": "number",
|
||
"minimum": -90,
|
||
"maximum": 90
|
||
},
|
||
"longitude": {
|
||
"type": "number",
|
||
"minimum": -180,
|
||
"maximum": 180
|
||
}
|
||
},
|
||
"required": [
|
||
"name"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"LocationUpdate": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 120
|
||
},
|
||
"parentId": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"address": {
|
||
"type": "string",
|
||
"maxLength": 200
|
||
},
|
||
"city": {
|
||
"type": "string",
|
||
"maxLength": 80
|
||
},
|
||
"guardianName": {
|
||
"type": "string",
|
||
"maxLength": 120
|
||
},
|
||
"guardianPhone": {
|
||
"type": "string",
|
||
"maxLength": 40
|
||
},
|
||
"latitude": {
|
||
"type": "number",
|
||
"minimum": -90,
|
||
"maximum": 90
|
||
},
|
||
"longitude": {
|
||
"type": "number",
|
||
"minimum": -180,
|
||
"maximum": 180
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"AssetsResponse": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"assets": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"reference": {
|
||
"type": "string"
|
||
},
|
||
"brand": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"serialNumber": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"commissionedAt": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"loadKg": {
|
||
"anyOf": [
|
||
{
|
||
"type": "integer",
|
||
"minimum": -9007199254740991,
|
||
"maximum": 9007199254740991
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"floors": {
|
||
"anyOf": [
|
||
{
|
||
"type": "integer",
|
||
"minimum": -9007199254740991,
|
||
"maximum": 9007199254740991
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"status": {
|
||
"type": "string",
|
||
"enum": [
|
||
"IN_SERVICE",
|
||
"OUT_OF_SERVICE",
|
||
"UNDER_MAINTENANCE"
|
||
]
|
||
},
|
||
"categoryId": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"categoryName": {
|
||
"type": "string"
|
||
},
|
||
"locationId": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"locationName": {
|
||
"type": "string"
|
||
},
|
||
"siteName": {
|
||
"type": "string"
|
||
},
|
||
"componentCount": {
|
||
"type": "integer",
|
||
"minimum": -9007199254740991,
|
||
"maximum": 9007199254740991
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"reference",
|
||
"brand",
|
||
"model",
|
||
"serialNumber",
|
||
"commissionedAt",
|
||
"loadKg",
|
||
"floors",
|
||
"status",
|
||
"categoryId",
|
||
"categoryName",
|
||
"locationId",
|
||
"locationName",
|
||
"siteName",
|
||
"componentCount"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"assets"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"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"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"email",
|
||
"displayName",
|
||
"phone",
|
||
"role",
|
||
"teams",
|
||
"status",
|
||
"isDemo"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"users"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"RolesResponse": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"roles": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"enum": [
|
||
"Administrateur",
|
||
"Dispatcher",
|
||
"Technicien",
|
||
"Technicien limité",
|
||
"Gestionnaire",
|
||
"Demandeur",
|
||
"Vue seule"
|
||
]
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"name"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"roles"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"InvitationResponse": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"userId": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"activationToken": {
|
||
"type": "string"
|
||
},
|
||
"expiresAt": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
||
}
|
||
},
|
||
"required": [
|
||
"userId",
|
||
"activationToken",
|
||
"expiresAt"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"InvitationCreate": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"email": {
|
||
"type": "string",
|
||
"format": "email",
|
||
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
||
},
|
||
"displayName": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 120
|
||
},
|
||
"roleId": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"teamIds": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
}
|
||
},
|
||
"phone": {
|
||
"type": "string",
|
||
"maxLength": 40
|
||
}
|
||
},
|
||
"required": [
|
||
"email",
|
||
"displayName",
|
||
"roleId"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"UserAdmin": {
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"email": {
|
||
"type": "string",
|
||
"format": "email",
|
||
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
||
},
|
||
"displayName": {
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"role": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"enum": [
|
||
"Administrateur",
|
||
"Dispatcher",
|
||
"Technicien",
|
||
"Technicien limité",
|
||
"Gestionnaire",
|
||
"Demandeur",
|
||
"Vue seule"
|
||
]
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"name"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
"teams": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"name"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
},
|
||
"status": {
|
||
"type": "string",
|
||
"enum": [
|
||
"active",
|
||
"invited",
|
||
"disabled"
|
||
]
|
||
},
|
||
"isDemo": {
|
||
"type": "boolean"
|
||
}
|
||
},
|
||
"required": [
|
||
"id",
|
||
"email",
|
||
"displayName",
|
||
"phone",
|
||
"role",
|
||
"teams",
|
||
"status",
|
||
"isDemo"
|
||
],
|
||
"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"
|
||
}
|
||
},
|
||
"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"
|
||
}
|
||
}
|
||
}
|
||
}
|