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