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 1/2] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20ver?= =?UTF-8?q?s=20"/"?= 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 From dab8a636d0441e07a0cdc64ae515b22392d672fb Mon Sep 17 00:00:00 2001 From: Maxime Pierront <maxime.pierront.ext@u-pec.fr> Date: Thu, 13 Mar 2025 17:28:17 +0100 Subject: [PATCH 2/2] Actualiser interface-contracts.json --- interface-contracts.json | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/interface-contracts.json b/interface-contracts.json index 1b2e236..98f304b 100644 --- a/interface-contracts.json +++ b/interface-contracts.json @@ -1,73 +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" - } - } - } +{ + "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": { + "isbn": "string(13)" + } + }, + + "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