This commit was merged in pull request #3.
This commit is contained in:
Azeez Muibi
2025-04-15 17:19:07 +01:00
parent ba96d7a8b4
commit 5f67e55e24
7 changed files with 292 additions and 2 deletions
+6
View File
@@ -61,6 +61,9 @@
"/login": {
"$ref": "../swagger/paths/Login.json"
},
"/dashboard": {
"$ref": "../swagger/paths/Dashboard.json"
},
"/Authorize": {
"$ref": "../swagger/paths/Authorize.json"
},
@@ -97,6 +100,9 @@
"LoginResponse": {
"$ref": "../swagger/schemas/LoginResponse.json"
},
"DashboardResponse": {
"$ref": "../swagger/schemas/DashboardResponse.json"
},
"LoansResponse": {
"$ref": "../swagger/schemas/LoansResponse.json"
},
+33
View File
@@ -0,0 +1,33 @@
{
"get": {
"tags": [
"Dashboard"
],
"summary": "Get dashboard data",
"description": "Retrieve summary data for the dashboard including loans, payments, request summary, and recent transactions",
"operationId": "getDashboard",
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/DashboardResponse.json"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"500": {
"description": "Internal server error"
}
}
}
}
+126
View File
@@ -0,0 +1,126 @@
{
"type": "object",
"properties": {
"loans": {
"type": "object",
"properties": {
"value": {
"type": "number",
"example": 50000.0
},
"currency": {
"type": "string",
"example": "Naira"
},
"currency_text": {
"type": "string",
"example": "₦"
},
"text": {
"type": "string",
"example": "this week"
}
}
},
"payments": {
"type": "object",
"properties": {
"value": {
"type": "number",
"example": 25
},
"currency": {
"type": "string",
"example": "Naira"
},
"currency_text": {
"type": "string",
"example": "₦"
},
"text": {
"type": "string",
"example": "this week"
}
}
},
"request_summary": {
"type": "object",
"properties": {
"eligibility_check": {
"type": "object",
"properties": {
"Eligibility": {
"type": "integer",
"example": 120
}
}
},
"select_offer": {
"type": "object",
"properties": {
"Offers": {
"type": "integer",
"example": 85
}
}
},
"provide_loan": {
"type": "object",
"properties": {
"Loans": {
"type": "integer",
"example": 50
}
}
},
"repayment": {
"type": "object",
"properties": {
"Repayments": {
"type": "integer",
"example": 30
}
}
}
}
},
"recent_transactions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1
},
"transaction_id": {
"type": "string",
"example": "TRX123456"
},
"account_id": {
"type": "string",
"example": "ACC456"
},
"type": {
"type": "string",
"example": "PAYMENT"
},
"channel": {
"type": "string",
"example": "MOBILE"
},
"created_at": {
"type": "string",
"format": "date-time",
"example": "2023-01-15T10:30:00Z"
},
"updated_at": {
"type": "string",
"format": "date-time",
"example": "2023-01-15T10:30:00Z"
}
}
}
}
}
}