From 79bc018b0e951ccab417b4dec78d6a9dac1a00ab Mon Sep 17 00:00:00 2001
From: Maxime Pierront <maxime.pierront.ext@u-pec.fr>
Date: Thu, 13 Mar 2025 16:32:04 +0100
Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?=
 =?UTF-8?q?"/"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 interface-contracts.json | 73 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 interface-contracts.json

diff --git a/interface-contracts.json b/interface-contracts.json
new file mode 100644
index 0000000..1b2e236
--- /dev/null
+++ b/interface-contracts.json
@@ -0,0 +1,73 @@
+{
+  "usecases": {
+    "EnregistrerNouveauLivre": {
+      "input": {
+        "isbn": "string(13)", 
+        "titre": "string(required)",
+        "auteur": "string(required)",
+        "editeur": "string(required)",
+        "datePublication": "date",
+        "prix": "decimal(positive)",
+        "stockInitial": "integer(min:0)",
+        "categories": "array<string>",
+        "description": "string",
+        "langue": "string"
+      },
+      "output": {
+        "livreId": "uuid"
+      }
+    },
+
+    "PasserCommande": {
+      "input": {
+        "clientId": "uuid",
+        "lignesCommande": [{
+          "livreId": "uuid",
+          "quantite": "integer(positive)"
+        }],
+        "adresseLivraison": {
+          "rue": "string",
+          "ville": "string",
+          "codePostal": "string",
+          "pays": "string"
+        },
+        "modePaiement": "string(enum: CB, PAYPAL, POINTS_FIDELITE)"
+      },
+      "output": {
+        "commandeId": "uuid",
+        "montantTotal": "decimal",
+        "pointsFideliteGagnes": "integer"
+      }
+    },
+    "GererAvis": {
+      "input": {
+        "clientId": "uuid",
+        "livreId": "uuid",
+        "note": "integer(min:1,max:5)",
+        "commentaire": "string",
+        "dateAchat": "date"
+      },
+      "output": {
+        "avisId": "uuid"
+      }
+    },
+
+    "CreerAbonnement": {
+      "input": {
+        "clientId": "uuid",
+        "duree": "integer(enum: 3,6,12)",
+        "modePaiement": {
+          "type": "string(enum: CB, PAYPAL)",
+          "details": "object"
+        },
+        "dateDebutSouhaitee": "date"
+      },
+      "output": {
+        "abonnementId": "uuid",
+        "dateDebut": "date",
+        "dateFin": "date",
+        "montantMensuel": "decimal"
+      }
+    }
+  }
+}
\ No newline at end of file