From 9a0f3b31bd144fe364f5b7c17f961097898d1741 Mon Sep 17 00:00:00 2001 From: ahom Date: Sat, 1 May 2021 21:16:28 +0200 Subject: [PATCH] feat: aligns with json:api feat: adds simulations endpoints to plans-parameters feat: lists all proper OAuth scopes fix: renames rental_investment endpoint to pinel fix: factorizes various structures --- models/BridgeLoan.v1.json | 0 models/BudgetAmounts.v1.json | 0 models/BudgetSimulation.v1.json | 43 +- models/Case.v1.json | 12 +- models/CaseMetaData.v1.json | 38 - models/CaseResponse.v1.json | 16 - models/CasesResponse.v1.json | 19 - models/Child.v1.json | 0 models/DebtConsolidationSimulation.v1.json | 43 +- models/DeleteResponse.v1.json | 16 - models/ErrorResponse.v1.json | 15 - models/FrenchIncomeTaxParameters.v1.json | 0 models/FundingResultsSummary.v1.json | 0 models/FundingSimulation.v1.json | 43 +- models/HouseholdDetails.v1.json | 0 models/Independant.v1.json | 0 models/Insurance.v1.json | 0 models/LightHouseholdDetails.v1.json | 0 models/Partner.v1.json | 9 +- models/PartnerResponse.v1.json | 16 - models/PartnersResponse.v1.json | 19 - models/PinelSimulation.v1.json | 43 +- models/PlanParameters.v1.json | 35 +- models/PlanParametersMetadata.v1.json | 23 - models/PlanParametersResponse.v1.json | 16 - models/ResponseMessage.v1.json | 19 - models/ScoreResponse.v1.json | 16 - models/SimulationMetadata.v1.json | 18 - models/SimulationResponse.v1.json | 16 - models/SimulationsResponse.v1.json | 19 - models/StandaloneBudgetPlanParameters.v1.json | 12 +- ...oneDebtConsolidationPlanParameters.v1.json | 8 +- .../StandaloneFundingPlanParameters.v1.json | 8 +- models/StandalonePinelParameters.v1.json | 8 +- models/SuccessResponse.v1.json | 24 - pkg/pypi/setup.py | 0 reference/toaztr.v1.yaml | 1413 +++++++++-------- 37 files changed, 830 insertions(+), 1137 deletions(-) mode change 100755 => 100644 models/BridgeLoan.v1.json mode change 100755 => 100644 models/BudgetAmounts.v1.json delete mode 100644 models/CaseMetaData.v1.json delete mode 100644 models/CaseResponse.v1.json delete mode 100644 models/CasesResponse.v1.json mode change 100755 => 100644 models/Child.v1.json delete mode 100644 models/DeleteResponse.v1.json delete mode 100644 models/ErrorResponse.v1.json mode change 100755 => 100644 models/FrenchIncomeTaxParameters.v1.json mode change 100755 => 100644 models/FundingResultsSummary.v1.json mode change 100755 => 100644 models/HouseholdDetails.v1.json mode change 100755 => 100644 models/Independant.v1.json mode change 100755 => 100644 models/Insurance.v1.json mode change 100755 => 100644 models/LightHouseholdDetails.v1.json delete mode 100644 models/PartnerResponse.v1.json delete mode 100644 models/PartnersResponse.v1.json delete mode 100644 models/PlanParametersMetadata.v1.json delete mode 100644 models/PlanParametersResponse.v1.json delete mode 100644 models/ResponseMessage.v1.json delete mode 100644 models/ScoreResponse.v1.json delete mode 100644 models/SimulationMetadata.v1.json delete mode 100644 models/SimulationResponse.v1.json delete mode 100644 models/SimulationsResponse.v1.json delete mode 100644 models/SuccessResponse.v1.json mode change 100755 => 100644 pkg/pypi/setup.py diff --git a/models/BridgeLoan.v1.json b/models/BridgeLoan.v1.json old mode 100755 new mode 100644 diff --git a/models/BudgetAmounts.v1.json b/models/BudgetAmounts.v1.json old mode 100755 new mode 100644 diff --git a/models/BudgetSimulation.v1.json b/models/BudgetSimulation.v1.json index 0cf5aa1..7687651 100644 --- a/models/BudgetSimulation.v1.json +++ b/models/BudgetSimulation.v1.json @@ -1,32 +1,25 @@ { "title": "BudgetSimulation", "description": "Réponse d'un calcul de budget.", - "allOf": [ - { - "$ref": "./SimulationMetadata.v1.json" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "default": "BUDGET", - "description": "Type de simulation.", - "enum": [ - "BUDGET" - ] - }, - "parameters": { - "$ref": "./BudgetParameters.v1.json" - }, - "results": { - "$ref": "./BudgetResults.v1.json" - } - }, - "required": [ - "type", - "parameters" + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "BUDGET", + "description": "Type de simulation.", + "enum": [ + "BUDGET" ] + }, + "parameters": { + "$ref": "./BudgetParameters.v1.json" + }, + "results": { + "$ref": "./BudgetResults.v1.json" } + }, + "required": [ + "type", + "parameters" ] } \ No newline at end of file diff --git a/models/Case.v1.json b/models/Case.v1.json index 54b5cf9..167e145 100644 --- a/models/Case.v1.json +++ b/models/Case.v1.json @@ -3,12 +3,9 @@ "title": "Case", "description": "Dossier emprunteur complet.", "properties": { - "id": { - "description": "ID unique du case.", - "type": "string" - }, - "etag": { - "type": "string" + "name": { + "type": "string", + "description": "Nom du dossier" }, "actor": { "oneOf": [ @@ -55,9 +52,6 @@ } ], "description": "Projet." - }, - "metadata": { - "$ref": "./CaseMetaData.v1.json" } } } \ No newline at end of file diff --git a/models/CaseMetaData.v1.json b/models/CaseMetaData.v1.json deleted file mode 100644 index c521a30..0000000 --- a/models/CaseMetaData.v1.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "type": "object", - "title": "CaseMetaData", - "description": "Meta données du dossier.", - "properties": { - "name": { - "description": "Nom permettant d'identifier le dossier, ou nom de l'affaire.", - "type": "string" - }, - "state": { - "description": "État du dossier.", - "type": "string", - "enum": [ - "NEW", - "INSTRUCTION", - "SENT_TO_BANK", - "ACCEPTED_BY_BANK", - "REFUSED_BY_BANK", - "ACCEPTED_BY_BORROWER", - "REFUSED_BY_BORROWER", - "FUNDS_DELIVERED", - "BILLED", - "CLOSED", - "CANCELLED" - ] - }, - "creation_date": { - "description": "Date de création du dossier (cette date est déterminée par le système automatiquement).", - "format": "date-time", - "type": "string" - }, - "last_update_date": { - "description": "Date de la dernière mise à jour du dossier (cette date est déterminée par le système automatiquement).", - "format": "date-time", - "type": "string" - } - } -} diff --git a/models/CaseResponse.v1.json b/models/CaseResponse.v1.json deleted file mode 100644 index 2c7c726..0000000 --- a/models/CaseResponse.v1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title": "CaseResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "./Case.v1.json" - } - } - } - ] -} \ No newline at end of file diff --git a/models/CasesResponse.v1.json b/models/CasesResponse.v1.json deleted file mode 100644 index 9310326..0000000 --- a/models/CasesResponse.v1.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "CasesResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "./Case.v1.json" - } - } - } - } - ] -} \ No newline at end of file diff --git a/models/Child.v1.json b/models/Child.v1.json old mode 100755 new mode 100644 diff --git a/models/DebtConsolidationSimulation.v1.json b/models/DebtConsolidationSimulation.v1.json index 21f47b0..d8f8b58 100644 --- a/models/DebtConsolidationSimulation.v1.json +++ b/models/DebtConsolidationSimulation.v1.json @@ -1,32 +1,25 @@ { "title": "DebtConsolidationSimulation", "description": "Réponse d'un rachat ou regroupement de crédits.", - "allOf": [ - { - "$ref": "./SimulationMetadata.v1.json" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "default": "DEBT_CONSOLIDATION", - "description": "Type de simulation.", - "enum": [ - "DEBT_CONSOLIDATION" - ] - }, - "parameters": { - "$ref": "./DebtConsolidationParameters.v1.json" - }, - "results": { - "$ref": "./DebtConsolidationResults.v1.json" - } - }, - "required": [ - "type", - "parameters" + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "DEBT_CONSOLIDATION", + "description": "Type de simulation.", + "enum": [ + "DEBT_CONSOLIDATION" ] + }, + "parameters": { + "$ref": "./DebtConsolidationParameters.v1.json" + }, + "results": { + "$ref": "./DebtConsolidationResults.v1.json" } + }, + "required": [ + "type", + "parameters" ] } \ No newline at end of file diff --git a/models/DeleteResponse.v1.json b/models/DeleteResponse.v1.json deleted file mode 100644 index 4ea6e2c..0000000 --- a/models/DeleteResponse.v1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title": "DeleteResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "type": "string" - } - } - } - ] -} \ No newline at end of file diff --git a/models/ErrorResponse.v1.json b/models/ErrorResponse.v1.json deleted file mode 100644 index b1bd8ad..0000000 --- a/models/ErrorResponse.v1.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "title": "ErrorResponse", - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "./ResponseMessage.v1.json" - } - } - }, - "required": [ - "errors" - ] -} \ No newline at end of file diff --git a/models/FrenchIncomeTaxParameters.v1.json b/models/FrenchIncomeTaxParameters.v1.json old mode 100755 new mode 100644 diff --git a/models/FundingResultsSummary.v1.json b/models/FundingResultsSummary.v1.json old mode 100755 new mode 100644 diff --git a/models/FundingSimulation.v1.json b/models/FundingSimulation.v1.json index 7b794dc..4560bb5 100644 --- a/models/FundingSimulation.v1.json +++ b/models/FundingSimulation.v1.json @@ -1,32 +1,25 @@ { "title": "FundingSimulation", "description": "Réponse d'un calcul de financement.", - "allOf": [ - { - "$ref": "./SimulationMetadata.v1.json" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "default": "FUNDING", - "description": "Type de simulation.", - "enum": [ - "FUNDING" - ] - }, - "parameters": { - "$ref": "./FundingParameters.v1.json" - }, - "results": { - "$ref": "./FundingResults.v1.json" - } - }, - "required": [ - "type", - "parameters" + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "FUNDING", + "description": "Type de simulation.", + "enum": [ + "FUNDING" ] + }, + "parameters": { + "$ref": "./FundingParameters.v1.json" + }, + "results": { + "$ref": "./FundingResults.v1.json" } + }, + "required": [ + "type", + "parameters" ] } \ No newline at end of file diff --git a/models/HouseholdDetails.v1.json b/models/HouseholdDetails.v1.json old mode 100755 new mode 100644 diff --git a/models/Independant.v1.json b/models/Independant.v1.json old mode 100755 new mode 100644 diff --git a/models/Insurance.v1.json b/models/Insurance.v1.json old mode 100755 new mode 100644 diff --git a/models/LightHouseholdDetails.v1.json b/models/LightHouseholdDetails.v1.json old mode 100755 new mode 100644 diff --git a/models/Partner.v1.json b/models/Partner.v1.json index 13d5331..1fec3d5 100644 --- a/models/Partner.v1.json +++ b/models/Partner.v1.json @@ -3,10 +3,6 @@ "title": "Partner", "description": "Partenaire, et sa liste de contacts.", "properties": { - "id": { - "description": "ID unique du partner.", - "type": "string" - }, "type": { "$ref": "./PartnerType.v1.json" }, @@ -44,5 +40,8 @@ "description": "Commentaire.", "type": "string" } - } + }, + "required": [ + "type" + ] } \ No newline at end of file diff --git a/models/PartnerResponse.v1.json b/models/PartnerResponse.v1.json deleted file mode 100644 index 7d60286..0000000 --- a/models/PartnerResponse.v1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title": "PartnerResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "./Partner.v1.json" - } - } - } - ] -} \ No newline at end of file diff --git a/models/PartnersResponse.v1.json b/models/PartnersResponse.v1.json deleted file mode 100644 index 76400b2..0000000 --- a/models/PartnersResponse.v1.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "PartnersResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "./Partner.v1.json" - } - } - } - } - ] -} \ No newline at end of file diff --git a/models/PinelSimulation.v1.json b/models/PinelSimulation.v1.json index eff069e..c9f8b4e 100644 --- a/models/PinelSimulation.v1.json +++ b/models/PinelSimulation.v1.json @@ -1,32 +1,25 @@ { "title": "PinelSimulation", "description": "Réponse de la simulation d'un dispositif Pinel.", - "allOf": [ - { - "$ref": "./SimulationMetadata.v1.json" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "default": "PINEL", - "description": "Type de simulation.", - "enum": [ - "PINEL" - ] - }, - "parameters": { - "$ref": "./PinelParameters.v1.json" - }, - "results": { - "$ref": "./PinelResults.v1.json" - } - }, - "required": [ - "type", - "parameters" + "type": "object", + "properties": { + "type": { + "type": "string", + "default": "PINEL", + "description": "Type de simulation.", + "enum": [ + "PINEL" ] + }, + "parameters": { + "$ref": "./PinelParameters.v1.json" + }, + "results": { + "$ref": "./PinelResults.v1.json" } + }, + "required": [ + "type", + "parameters" ] } \ No newline at end of file diff --git a/models/PlanParameters.v1.json b/models/PlanParameters.v1.json index 2306e44..33e32ca 100644 --- a/models/PlanParameters.v1.json +++ b/models/PlanParameters.v1.json @@ -1,18 +1,31 @@ { "title": "PlanParameters", - "oneOf": [ + "description": "Paramètres conservés isolément.", + "allOf": [ { - "$ref": "./StandaloneBudgetPlanParameters.v1.json" + "oneOf": [ + { + "$ref": "./StandaloneBudgetPlanParameters.v1.json" + }, + { + "$ref": "./StandaloneFundingPlanParameters.v1.json" + }, + { + "$ref": "./StandaloneDebtConsolidationPlanParameters.v1.json" + }, + { + "$ref": "./StandalonePinelParameters.v1.json" + } + ] }, { - "$ref": "./StandaloneFundingPlanParameters.v1.json" - }, - { - "$ref": "./StandaloneDebtConsolidationPlanParameters.v1.json" - }, - { - "$ref": "./StandalonePinelParameters.v1.json" + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Nom des paramètres" + } + } } - ], - "description": "Paramètres conservés isolément." + ] } \ No newline at end of file diff --git a/models/PlanParametersMetadata.v1.json b/models/PlanParametersMetadata.v1.json deleted file mode 100644 index b908c54..0000000 --- a/models/PlanParametersMetadata.v1.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "title": "PlanParametersMetadata", - "description": "Métadata du plan de financement.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Identifiant du jeu de paramètres du plan de financement." - }, - "case_id": { - "type": "string", - "description": "Identifiant du dossier attaché à ce jeu de paramètres de plan de financement." - }, - "name": { - "type": "string", - "description": "Nom du jeu de paramètres." - } - }, - "required": [ - "id", - "case_id" - ] -} \ No newline at end of file diff --git a/models/PlanParametersResponse.v1.json b/models/PlanParametersResponse.v1.json deleted file mode 100644 index b8203df..0000000 --- a/models/PlanParametersResponse.v1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title": "PlanParametersResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "./PlanParameters.v1.json" - } - } - } - ] -} diff --git a/models/ResponseMessage.v1.json b/models/ResponseMessage.v1.json deleted file mode 100644 index 9b16ff6..0000000 --- a/models/ResponseMessage.v1.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "ResponseMessage", - "type": "object", - "properties": { - "code": { - "type": "number" - }, - "title": { - "type": "string" - }, - "details": { - "type": "string" - } - }, - "required": [ - "code", - "title" - ] -} \ No newline at end of file diff --git a/models/ScoreResponse.v1.json b/models/ScoreResponse.v1.json deleted file mode 100644 index 96c98c3..0000000 --- a/models/ScoreResponse.v1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title": "ScoreResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "./Score.v1.json" - } - } - } - ] -} \ No newline at end of file diff --git a/models/SimulationMetadata.v1.json b/models/SimulationMetadata.v1.json deleted file mode 100644 index 9b3f6cc..0000000 --- a/models/SimulationMetadata.v1.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "object", - "title": "SimulationMetadata", - "description": "Metadate de la simulation.", - "properties": { - "id": { - "description": "ID unique de la simulation", - "type": "string" - }, - "case_id": { - "description": "ID du dossier lié à cette simulation", - "type": "string" - } - }, - "required": [ - "id" - ] -} \ No newline at end of file diff --git a/models/SimulationResponse.v1.json b/models/SimulationResponse.v1.json deleted file mode 100644 index 8e3eafb..0000000 --- a/models/SimulationResponse.v1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title": "SimulationResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "./Simulation.v1.json" - } - } - } - ] -} \ No newline at end of file diff --git a/models/SimulationsResponse.v1.json b/models/SimulationsResponse.v1.json deleted file mode 100644 index e01f2d3..0000000 --- a/models/SimulationsResponse.v1.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "SimulationsResponse", - "allOf": [ - { - "$ref": "./SuccessResponse.v1.json" - }, - { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "./Simulation.v1.json" - } - } - } - } - ] -} \ No newline at end of file diff --git a/models/StandaloneBudgetPlanParameters.v1.json b/models/StandaloneBudgetPlanParameters.v1.json index 3b08d5d..431d955 100644 --- a/models/StandaloneBudgetPlanParameters.v1.json +++ b/models/StandaloneBudgetPlanParameters.v1.json @@ -1,8 +1,9 @@ { "title": "StandaloneBudgetPlanParameters", + "description": "Paramètres d'un calcul de budget, conservés isolément.", "allOf": [ { - "$ref": "./PlanParametersMetadata.v1.json" + "$ref": "./BudgetPlanParameters.v1.json" }, { "type": "object", @@ -12,16 +13,13 @@ "enum": [ "BUDGET_PLAN_PARAMETERS" ], - "description": "Type du jeu de paramètres." - }, - "parameters": { - "$ref": "./BudgetPlanParameters.v1.json" + "description": "Type du jeu de paramètres.", + "default": "BUDGET_PLAN_PARAMETERS" } }, "required": [ "type" ] } - ], - "description": "Paramètres d'un calcul de budget, conservés isolément." + ] } \ No newline at end of file diff --git a/models/StandaloneDebtConsolidationPlanParameters.v1.json b/models/StandaloneDebtConsolidationPlanParameters.v1.json index 9e5d63c..31a3e61 100644 --- a/models/StandaloneDebtConsolidationPlanParameters.v1.json +++ b/models/StandaloneDebtConsolidationPlanParameters.v1.json @@ -2,7 +2,7 @@ "title": "StandaloneDebtConsolidationPlanParameters", "allOf": [ { - "$ref": "./PlanParametersMetadata.v1.json" + "$ref": "./DebtConsolidationPlanParameters.v1.json" }, { "type": "object", @@ -12,10 +12,8 @@ "enum": [ "DEBT_CONSOLIDATION_PLAN_PARAMETERS" ], - "description": "Type du jeu de paramètres." - }, - "parameters": { - "$ref": "./DebtConsolidationPlanParameters.v1.json" + "description": "Type du jeu de paramètres.", + "default": "DEBT_CONSOLIDATION_PLAN_PARAMETERS" } }, "required": [ diff --git a/models/StandaloneFundingPlanParameters.v1.json b/models/StandaloneFundingPlanParameters.v1.json index ce13ad7..cf8ca6d 100644 --- a/models/StandaloneFundingPlanParameters.v1.json +++ b/models/StandaloneFundingPlanParameters.v1.json @@ -3,7 +3,7 @@ "description": "Paramètres d'un financement, conservés isolément.", "allOf": [ { - "$ref": "./PlanParametersMetadata.v1.json" + "$ref": "./FundingPlanParameters.v1.json" }, { "type": "object", @@ -13,10 +13,8 @@ "enum": [ "FUNDING_PLAN_PARAMETERS" ], - "description": "Type du jeu de paramètres." - }, - "parameters": { - "$ref": "./FundingPlanParameters.v1.json" + "description": "Type du jeu de paramètres.", + "default": "FUNDING_PLAN_PARAMETERS" } }, "required": [ diff --git a/models/StandalonePinelParameters.v1.json b/models/StandalonePinelParameters.v1.json index 00752f6..fbc2f90 100644 --- a/models/StandalonePinelParameters.v1.json +++ b/models/StandalonePinelParameters.v1.json @@ -2,7 +2,7 @@ "title": "StandalonePinelParameters", "allOf": [ { - "$ref": "./PlanParametersMetadata.v1.json" + "$ref": "./PinelPlanParameters.v1.json" }, { "type": "object", @@ -12,10 +12,8 @@ "enum": [ "PINEL_PLAN_PARAMETERS" ], - "description": "Type du jeu de paramètres." - }, - "parameters": { - "$ref": "./PinelPlanParameters.v1.json" + "description": "Type du jeu de paramètres.", + "default": "PINEL_PLAN_PARAMETERS" } }, "required": [ diff --git a/models/SuccessResponse.v1.json b/models/SuccessResponse.v1.json deleted file mode 100644 index bdd677e..0000000 --- a/models/SuccessResponse.v1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "title": "SuccessResponse", - "type": "object", - "properties": { - "data": { - "type": "object" - }, - "warnings": { - "type": "array", - "items": { - "$ref": "./ResponseMessage.v1.json" - } - }, - "infos": { - "type": "array", - "items": { - "$ref": "./ResponseMessage.v1.json" - } - } - }, - "required": [ - "data" - ] -} \ No newline at end of file diff --git a/pkg/pypi/setup.py b/pkg/pypi/setup.py old mode 100755 new mode 100644 diff --git a/reference/toaztr.v1.yaml b/reference/toaztr.v1.yaml index 6f7f395..097695b 100644 --- a/reference/toaztr.v1.yaml +++ b/reference/toaztr.v1.yaml @@ -1,25 +1,21 @@ openapi: 3.0.3 tags: - name: Cases - description: Case related endpoints + description: Relatif aux dossiers - name: Simulations - description: Simulation related endpoints + description: Relatif aux simulations - name: Compute - description: Various utility endpoints - - name: Zones - description: Zone related endpoints + description: Utilitaires - name: Score - description: Score related endpoints + description: Relatif au scoring - name: Partners - description: Partner related endpoints - - name: Users - description: User related endpoints + description: Relatif aux partenaires - name: PlanParameters - description: PlanParameters related endpoints + description: Relatif aux parametres de plan de financement info: contact: name: API Support - description: This is the documentation for the Toaztr API. + description: Documentation des API Toaztr title: Toaztr API version: 1.0.0 x-logo: @@ -29,129 +25,338 @@ components: securitySchemes: OAuth: type: oauth2 - description: This API uses OAuth2 with clientCredentials and authorizationCode flows + description: Cette API utilise le framework d'authorisation OAuth2 flows: clientCredentials: - tokenUrl: https://auth.toaztr.com/oauth2/token + tokenUrl: 'https://auth.toaztr.com/oauth2/token' scopes: - simulations/*: Full access to simulations endpoints - cases/*: Full access to cases endpoints + cases/read: Acces en lecture aux dossiers + cases/write: Acces en ecriture aux dossiers + cases/*: Acces complet aux dossiers + simulations/budget: Acces aux simulations de budget + simulations/funding: Acces aux simulations de financement + simulations/debt_consolidation: Acces aux simulations de consolidation de dette + simulations/pinel: Acces aux simulations pinel + simulations/*: Acces a toutes les simulations + scores/*: Acces au scoring authorizationCode: - authorizationUrl: https://auth.toaztr.com/oauth2/authorize - tokenUrl: https://auth.toaztr.com/oauth2/token + authorizationUrl: 'https://auth.toaztr.com/oauth2/authorize' + tokenUrl: 'https://auth.toaztr.com/oauth2/token' scopes: - simulations/*: Full access to simulations endpoints - cases/*: Full access to cases endpoints + cases/read: Acces en lecture aux dossiers + cases/write: Acces en ecriture aux dossiers + cases/*: Acces complet aux dossiers + simulations/budget: Acces aux simulations de budget + simulations/funding: Acces aux simulations de financement + simulations/debt_consolidation: Acces aux simulations de consolidation de dette + simulations/pinel: Acces aux simulations pinel + simulations/*: Acces a toutes les simulations + scores/*: Acces au scoring + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: Not authorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + parameters: + id: + name: id + in: path + required: true + schema: + type: string + description: ID unique de la resource + caseId: + name: caseId + in: path + required: true + schema: + type: string + description: ID du dossier parent + planId: + name: planId + in: path + required: true + schema: + type: string + description: ID des parametres du plan de financement parent + IfMatch: + name: If-Match + in: header + required: false + schema: + type: string + description: Entity tag de la resource + 'page[size]': + name: 'page[size]' + in: query + required: false + schema: + type: number + minimum: 0 + maximum: 20 + default: 10 + description: Taille de la page a retourner + 'page[after]': + name: 'page[after]' + in: query + required: false + schema: + type: string + description: Curseur a partir duquel la page debute + 'page[before]': + name: 'page[before]' + in: query + required: false + schema: + type: string + description: Curseur a partir duquel la page debute + schemas: + Resource: + title: Resource + type: object + description: Resource identifiée uniquement par son type et son id + properties: + id: + type: string + description: ID unique de la resource + readOnly: true + type: + type: string + description: Type de la resource + attributes: + type: object + description: Attributs de la resource + meta: + type: object + description: Meta-données de la resourc + properties: + etag: + type: string + description: ETag de la resource + readOnly: true + created_at: + type: string + format: date-time + description: Date de création de la resourc + readOnly: true + last_updated_at: + type: string + format: date-time + description: Date de dernière update de la resourc + readOnly: true + required: + - type + CaseResource: + title: CaseResource + allOf: + - $ref: '#/components/schemas/Resource' + - type: object + properties: + type: + type: string + default: CASE + enum: + - CASE + attributes: + $ref: ../models/Case.v1.json + required: + - type + description: Represente un dossier + ErrorResponse: + title: ErrorResponse + type: object + description: Represente une réponse en erreur + properties: + errors: + type: array + items: + type: object + properties: + title: + type: string + description: Type d'erreur + detail: + type: string + description: Détails de l'erreur + source: + type: object + properties: + pointer: + type: string + description: JSON Pointer vers le field en erreur + parameter: + type: string + description: Nom du paramètre en erreur + header: + type: string + description: Nom du header en erreur + PaginatedResponse: + title: PaginatedResponse + type: object + description: Page de resources + properties: + data: + type: array + items: + type: object + properties: + meta: + type: object + properties: + page: + type: object + properties: + cursor: + type: string + description: Curseur pointant sur cet élément + links: + type: object + properties: + prev: + type: string + description: Lien vers la page précedente + next: + type: string + description: Lien vers la prochaine page + PartnerResource: + title: PartnerResource + allOf: + - $ref: '#/components/schemas/Resource' + - type: object + properties: + type: + type: string + default: v + enum: + - PARTNER + attributes: + $ref: ../models/Partner.v1.json + required: + - type + description: Représente un partenaire + PlanParametersResource: + title: PlanParametersResource + allOf: + - $ref: '#/components/schemas/Resource' + - type: object + properties: + type: + type: string + default: PLAN_PARAMETERS + enum: + - PLAN_PARAMETERS + attributes: + $ref: ../models/PlanParameters.v1.json + required: + - type + SimulationResource: + title: SimulationResource + allOf: + - $ref: '#/components/schemas/Resource' + - type: object + properties: + type: + type: string + default: SIMULATION + enum: + - SIMULATION + attributes: + $ref: ../models/Simulation.v1.json + required: + - type paths: '/v1/cases/{id}': delete: operationId: deleteCase tags: - Cases - description: '/cases/{id}' + description: Supprime un dossier par ID parameters: - - description: Entity tag of the resource that is being updated - in: header - name: If-Match - schema: - type: string + - $ref: '#/components/parameters/IfMatch' responses: '200': description: OK - content: - application/json: - schema: - $ref: ../models/DeleteResponse.v1.json '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '409': - description: Conflict error while trying to update the resource - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/409' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Deletes cases based on ID + $ref: '#/components/responses/500' + summary: Supprime un dossier par ID + security: + - OAuth: + - cases/write get: operationId: getCaseById tags: - Cases - description: '/cases/{id}' + description: Retourne un dossier par ID responses: '200': + description: OK content: application/json: schema: - $ref: ../models/CaseResponse.v1.json - description: OK + type: object + properties: + data: + $ref: '#/components/schemas/CaseResource' headers: ETag: - description: Entity tag of the user resource schema: type: string + description: Entity tag of the resource '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Returns cases by ID + $ref: '#/components/responses/500' + summary: Retourne des cases par ID + security: + - OAuth: + - cases/read parameters: - - in: path - name: id - required: true - schema: - type: string + - $ref: '#/components/parameters/id' put: operationId: putCase tags: - Cases - description: '/cases/{id}' + description: Mets a jour un case par ID parameters: - - description: Entity tag of the resource that is being updated - in: header - name: If-Match - schema: - type: string + - $ref: '#/components/parameters/IfMatch' requestBody: content: application/json: @@ -162,92 +367,66 @@ paths: content: application/json: schema: - $ref: ../models/CaseResponse.v1.json + $ref: '#/components/schemas/CaseResource' description: OK headers: ETag: - description: Entity tag of the user resource + description: Entity tag of the resource schema: type: string '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '409': - description: Conflict error while trying to update the resource - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/409' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Updates cases based on ID + $ref: '#/components/responses/500' + summary: Mets a jour un cases par ID + security: + - OAuth: + - cases/write /v1/cases: get: operationId: getCases tags: - Cases - description: /cases + description: List cases parameters: - - description: The number of items to skip before starting to collect the result set - in: query - name: offset - schema: - type: integer - - description: The numbers of items to return - in: query - name: limit - schema: - type: integer + - $ref: '#/components/parameters/page[size]' + - $ref: '#/components/parameters/page[after]' + - $ref: '#/components/parameters/page[before]' responses: '200': content: application/json: schema: - $ref: ../models/CasesResponse.v1.json + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + - type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/CaseResource' description: OK '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/500' summary: List cases + security: + - OAuth: + - cases/read post: operationId: postCase tags: - Cases - description: /cases + description: Creer un case requestBody: content: application/json: @@ -258,181 +437,33 @@ paths: content: application/json: schema: - $ref: ../models/CaseResponse.v1.json + type: object + properties: + data: + $ref: '#/components/schemas/CaseResource' description: OK headers: ETag: - description: Entity tag of the user resource + description: Entity tag of the resource schema: type: string '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/500' summary: Creates cases - parameters: [] - '/v1/simulations/{id}': - delete: - operationId: deleteSimulation - tags: - - Simulations - description: '/simulations/{id}' - parameters: - - description: Entity tag of the resource that is being updated - in: header - name: If-Match - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: ../models/DeleteResponse.v1.json - '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '409': - description: Conflict error while trying to update the resource - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Deletes simulations based on ID - get: - operationId: getSimulationById - tags: - - Simulations - description: '/simulations/{id}' - responses: - '200': - content: - application/json: - schema: - $ref: ../models/SimulationResponse.v1.json - description: OK - headers: - ETag: - description: Entity tag of the user resource - schema: - type: string - '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Returns simulations by ID - parameters: - - in: path - name: id - required: true - schema: - type: string - /v1/simulations: - get: - operationId: getSimulations - tags: - - Simulations - description: /simulations - parameters: - - description: The number of items to skip before starting to collect the result set - in: query - name: offset - schema: - type: integer - - description: The numbers of items to return - in: query - name: limit - schema: - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: ../models/SimulationsResponse.v1.json - description: OK - '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: List simulations + security: + - OAuth: + - cases/write parameters: [] /v1/simulations/budget: post: operationId: postBudgetSimulation tags: - Simulations - description: /simulations/budget + description: Simulates a budget requestBody: content: application/json: @@ -443,39 +474,29 @@ paths: content: application/json: schema: - $ref: ../models/SimulationResponse.v1.json + type: object + properties: + data: + $ref: ../models/BudgetResults.v1.json description: OK - headers: - ETag: - description: Entity tag of the user resource - schema: - type: string + headers: {} '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/500' summary: Creates budget simulations + security: + - OAuth: + - simulations/budget parameters: [] /v1/simulations/funding: post: operationId: postFundingSimulation tags: - Simulations - description: /simulations/funding + description: Simulates a funding requestBody: content: application/json: @@ -486,39 +507,29 @@ paths: content: application/json: schema: - $ref: ../models/SimulationResponse.v1.json + type: object + properties: + data: + $ref: ../models/FundingResults.v1.json description: OK - headers: - ETag: - description: Entity tag of the user resource - schema: - type: string + headers: {} '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/500' summary: Creates funding simulations + security: + - OAuth: + - simulations/funding parameters: [] - /v1/simulations/rental_investment: + /v1/simulations/pinel: post: - operationId: postRentalInvestmentSimulation + operationId: postPinelSimulation tags: - Simulations - description: /simulations/rental_investment + description: Simulates pinel requestBody: content: application/json: @@ -529,39 +540,29 @@ paths: content: application/json: schema: - $ref: ../models/SimulationResponse.v1.json + type: object + properties: + data: + $ref: ../models/PinelResults.v1.json description: OK - headers: - ETag: - description: Entity tag of the user resource - schema: - type: string + headers: {} '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Creates rental investment simulations + $ref: '#/components/responses/500' + summary: Creates pinel simulations + security: + - OAuth: + - simulations/pinel parameters: [] /v1/simulations/debt_consolidation: post: operationId: postDebtConsolidationSimulation tags: - Simulations - description: /simulations/debt_consolidation + description: Simulates a debt consolidation requestBody: content: application/json: @@ -572,39 +573,29 @@ paths: content: application/json: schema: - $ref: ../models/SimulationResponse.v1.json + type: object + properties: + data: + $ref: ../models/DebtConsolidationResults.v1.json description: OK - headers: - ETag: - description: Entity tag of the user resource - schema: - type: string + headers: {} '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/500' summary: Creates debt consolidation simulations + security: + - OAuth: + - simulations/debt_consolidation parameters: [] - /v1/score: + /v1/scores: post: operationId: postScore tags: - Score - description: /score + description: Scores a case requestBody: content: application/json: @@ -615,137 +606,88 @@ paths: content: application/json: schema: - $ref: ../models/ScoreResponse.v1.json + type: object + properties: + data: + $ref: ../models/Score.v1.json description: OK '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/500' summary: Compute score and rate on a case + security: + - OAuth: + - scores/* parameters: [] '/v1/partners/{id}': delete: operationId: deletePartner tags: - Partners - description: '/partners/{id}' + description: Supprime un a partner par ID parameters: - - description: Entity tag of the resource that is being updated - in: header - name: If-Match - schema: - type: string + - $ref: '#/components/parameters/IfMatch' responses: '200': description: OK - content: - application/json: - schema: - $ref: ../models/DeleteResponse.v1.json '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '409': - description: Conflict error while trying to update the resource - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/409' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Deletes partners based on ID + $ref: '#/components/responses/500' + summary: Supprime un partners par ID + security: + - OAuth: + - cases/write get: operationId: getPartnerById tags: - Partners - description: '/partners/{id}' + description: Retourne un partner par ID responses: '200': content: application/json: schema: - $ref: ../models/PartnerResponse.v1.json + type: object + properties: + data: + $ref: '#/components/schemas/PartnerResource' description: OK headers: ETag: - description: Entity tag of the user resource + description: Entity tag of the resource schema: type: string '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Returns partners by ID + $ref: '#/components/responses/500' + summary: Retourne des partners par ID + security: + - OAuth: + - cases/read parameters: - - in: path - name: id - required: true - schema: - type: string + - $ref: '#/components/parameters/id' put: operationId: putPartner tags: - Partners - description: '/partners/{id}' + description: Mets a jour un partner par ID parameters: - - description: Entity tag of the resource that is being updated - in: header - name: If-Match - schema: - type: string + - $ref: '#/components/parameters/IfMatch' requestBody: content: application/json: @@ -756,92 +698,69 @@ paths: content: application/json: schema: - $ref: ../models/PartnerResponse.v1.json + type: object + properties: + data: + $ref: '#/components/schemas/PartnerResource' description: OK headers: ETag: - description: Entity tag of the user resource + description: Entity tag of the resource schema: type: string '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '409': - description: Conflict error while trying to update the resource - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/409' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Updates partners based on ID + $ref: '#/components/responses/500' + summary: Mets a jour un partners par ID + security: + - OAuth: + - cases/write /v1/partners: get: operationId: getPartners tags: - Partners - description: /partners + description: List partners parameters: - - description: The number of items to skip before starting to collect the result set - in: query - name: offset - schema: - type: integer - - description: The numbers of items to return - in: query - name: limit - schema: - type: integer + - $ref: '#/components/parameters/page[size]' + - $ref: '#/components/parameters/page[after]' + - $ref: '#/components/parameters/page[before]' responses: '200': content: application/json: schema: - $ref: ../models/PartnersResponse.v1.json + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + - type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/PartnerResource' description: OK '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/500' summary: List partners + security: + - OAuth: + - cases/read post: operationId: postPartner tags: - Partners - description: /partners + description: Creer un partner requestBody: content: application/json: @@ -852,39 +771,33 @@ paths: content: application/json: schema: - $ref: ../models/PartnerResponse.v1.json + type: object + properties: + data: + $ref: '#/components/schemas/PartnerResource' description: OK headers: ETag: - description: Entity tag of the user resource + description: Entity tag of the resource schema: type: string '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/500' summary: Creates partners + security: + - OAuth: + - cases/write parameters: [] /v1/compute/notary_fees: post: operationId: postNotaryFees tags: - Compute - description: /compute/notary_fees + description: Computes notary fees requestBody: content: application/json: @@ -898,19 +811,22 @@ paths: $ref: ../models/NotaryFees.v1.json description: OK '400': - description: Bad request + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint + $ref: '#/components/responses/403' '500': - description: Internal server error + $ref: '#/components/responses/500' summary: Compute notary fees + security: + - OAuth: + - simulations/* parameters: [] /v1/compute/income_tax: post: operationId: postIncomeTax tags: - Compute - description: /compute/income_tax + description: Calcule le montant d'impots requestBody: content: application/json: @@ -924,126 +840,80 @@ paths: $ref: ../models/FrenchIncomeTax.v1.json description: OK '400': - description: Bad request + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint + $ref: '#/components/responses/403' '500': - description: Internal server error + $ref: '#/components/responses/500' summary: Computes income taxes - '/v1/cases/{case_id}/plan-parameters/{id}': + security: + - OAuth: + - simulations/* + '/v1/cases/{caseId}/plans-parameters/{id}': delete: - operationId: deletePlanParameters - tags: - - PlanParameters - description: '/cases/{case_id}/plan-parameters/{id}' + operationId: deletePlansParameters + description: Supprime un par ID parameters: - - description: Entity tag of the resource that is being updated - in: header - name: If-Match - schema: - type: string + - $ref: '#/components/parameters/IfMatch' responses: '200': description: OK - content: - application/json: - schema: - $ref: ../models/DeleteResponse.v1.json '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '409': - description: Conflict error while trying to update the resource - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/409' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Deletes plan-parameters based on ID - get: - operationId: getPlanParametersById + $ref: '#/components/responses/500' + summary: Supprime un plan par ID + security: + - OAuth: + - cases/write tags: - - PlanParameters - description: '/cases/{case_id}/plan-parameters/{id}' + - Cases + get: + operationId: getPlansParametersById + description: Retourne un plans-parameters par ID responses: '200': content: application/json: schema: - $ref: ../models/PlanParametersResponse.v1.json + type: object + properties: + data: + $ref: '#/components/schemas/PlanParametersResource' description: OK headers: ETag: - description: Entity tag of the user resource + description: Entity tag of the resource schema: type: string '400': - description: Bad Request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Returns plan-parameters by ID + $ref: '#/components/responses/500' + summary: Retourne des plans-parameters par ID + security: + - OAuth: + - cases/read + tags: + - Cases parameters: - - in: path - name: id - required: true - schema: - type: string - - in: path - name: case_id - required: true - schema: - type: string + - $ref: '#/components/parameters/id' + - $ref: '#/components/parameters/caseId' put: - operationId: putPlanParameters - tags: - - PlanParameters - description: '/cases/{case_id}/plan-parameters/{id}' + operationId: putPlansParameters + description: Mets a jour un plans-parameters par ID parameters: - - description: Entity tag of the resource that is being updated - in: header - name: If-Match - schema: - type: string + - $ref: '#/components/parameters/IfMatch' requestBody: content: application/json: @@ -1054,56 +924,38 @@ paths: content: application/json: schema: - $ref: ../models/PlanParametersResponse.v1.json + type: object + properties: + data: + $ref: '#/components/schemas/PlanParametersResource' description: OK headers: ETag: - description: Entity tag of the user resource + description: Entity tag of the resource schema: type: string '400': - description: Bad request - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/403' '404': - description: Resource not found - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/404' '409': - description: Conflict error while trying to update the resource - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json + $ref: '#/components/responses/409' '500': - description: Internal server error - content: - application/json: - schema: - $ref: ../models/ErrorResponse.v1.json - summary: Updates plan-parameters based on ID - '/v1/cases/{case_id}/plan-parameters': + $ref: '#/components/responses/500' + summary: Mets a jour un plans-parameters par ID + security: + - OAuth: + - cases/write + tags: + - Cases + '/v1/cases/{caseId}/plans-parameters': parameters: - - in: path - name: case_id - required: true - schema: - type: string + - $ref: '#/components/parameters/caseId' post: - operationId: postPlanParameters - tags: - - PlanParameters - description: '/v1/cases/{case_id}/plan-parameters' + operationId: postPlansParameters + description: Creer un plans-parameters requestBody: content: application/json: @@ -1114,32 +966,193 @@ paths: content: application/json: schema: - $ref: ../models/PlanParametersResponse.v1.json + type: object + properties: + data: + $ref: '#/components/schemas/PlanParametersResource' description: OK headers: ETag: - description: Entity tag of the user resource + description: Entity tag of the resource schema: type: string '400': - description: Bad request + $ref: '#/components/responses/400' + '403': + $ref: '#/components/responses/403' + '500': + $ref: '#/components/responses/500' + summary: Creates plans-parameters + security: + - OAuth: + - cases/write + tags: + - Cases + get: + summary: List plans-parameters + operationId: getPlansParameters + responses: + '200': + description: OK content: application/json: schema: - $ref: ../models/ErrorResponse.v1.json + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + - type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/PlanParametersResource' + '400': + $ref: '#/components/responses/400' '403': - description: Not authorized to access this endpoint + $ref: '#/components/responses/403' + '500': + $ref: '#/components/responses/500' + description: List plans parameters + security: + - OAuth: + - cases/read + parameters: + - $ref: '#/components/parameters/page[size]' + - $ref: '#/components/parameters/page[after]' + - $ref: '#/components/parameters/page[before]' + tags: + - Cases + '/v1/cases/{caseId}/plans-parameters/{planId}/simulations': + parameters: + - schema: + type: string + name: caseId + in: path + required: true + - schema: + type: string + name: planId + in: path + required: true + get: + summary: List simulations + responses: + '200': + description: OK content: application/json: schema: - $ref: ../models/ErrorResponse.v1.json + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + - type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/SimulationResource' + '400': + $ref: '#/components/responses/400' + '403': + $ref: '#/components/responses/403' '500': - description: Internal server error + $ref: '#/components/responses/500' + operationId: getSimulations + description: List simulations + security: + - OAuth: + - cases/read + parameters: + - $ref: '#/components/parameters/page[size]' + - $ref: '#/components/parameters/page[after]' + - $ref: '#/components/parameters/page[before]' + tags: + - Cases + post: + summary: Creates simulations + operationId: postSimulation + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/SimulationResource' + '400': + $ref: '#/components/responses/400' + '403': + $ref: '#/components/responses/403' + '500': + $ref: '#/components/responses/500' + description: Creer une simulation pour ce dossier et ce plan + parameters: [] + security: + - OAuth: + - cases/write + tags: + - Cases + '/v1/cases/{caseId}/plans-parameters/{planId}/simulations/{id}': + parameters: + - $ref: '#/components/parameters/caseId' + - $ref: '#/components/parameters/planId' + - $ref: '#/components/parameters/id' + get: + summary: Retourne des simulations par ID + tags: + - Cases + responses: + '200': + description: OK + headers: + ETag: + schema: + type: string + description: Entity tag of the resource content: application/json: schema: - $ref: ../models/ErrorResponse.v1.json - summary: Creates plan-parameters + type: object + properties: + data: + $ref: '#/components/schemas/SimulationResource' + '400': + $ref: '#/components/responses/400' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + operationId: getSimulationById + description: Retourne une simulation par ID + security: + - OAuth: + - cases/read + delete: + summary: Supprime une simulation par ID + operationId: deleteSimulation + parameters: + - $ref: '#/components/parameters/IfMatch' + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/400' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '409': + $ref: '#/components/responses/409' + '500': + $ref: '#/components/responses/500' + description: Supprime une simulation par ID + security: + - OAuth: + - cases/write + tags: + - Cases servers: - description: Production server url: 'https://api.toaztr.com'