quantix-mcp 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +7 -0
- package/.github/agents/copilot-instructions.md +32 -0
- package/.github/agents/speckit.analyze.agent.md +184 -0
- package/.github/agents/speckit.checklist.agent.md +294 -0
- package/.github/agents/speckit.clarify.agent.md +181 -0
- package/.github/agents/speckit.constitution.agent.md +82 -0
- package/.github/agents/speckit.implement.agent.md +135 -0
- package/.github/agents/speckit.plan.agent.md +89 -0
- package/.github/agents/speckit.specify.agent.md +258 -0
- package/.github/agents/speckit.tasks.agent.md +137 -0
- package/.github/agents/speckit.taskstoissues.agent.md +30 -0
- package/.github/copilot-instructions.md +17 -0
- package/.github/prompts/speckit.analyze.prompt.md +3 -0
- package/.github/prompts/speckit.checklist.prompt.md +3 -0
- package/.github/prompts/speckit.clarify.prompt.md +3 -0
- package/.github/prompts/speckit.constitution.prompt.md +3 -0
- package/.github/prompts/speckit.implement.prompt.md +3 -0
- package/.github/prompts/speckit.plan.prompt.md +3 -0
- package/.github/prompts/speckit.specify.prompt.md +3 -0
- package/.github/prompts/speckit.tasks.prompt.md +3 -0
- package/.github/prompts/speckit.taskstoissues.prompt.md +3 -0
- package/.github/workflows/publish.yaml +28 -0
- package/.opencode/command/speckit.analyze.md +184 -0
- package/.opencode/command/speckit.checklist.md +294 -0
- package/.opencode/command/speckit.clarify.md +181 -0
- package/.opencode/command/speckit.constitution.md +84 -0
- package/.opencode/command/speckit.implement.md +135 -0
- package/.opencode/command/speckit.plan.md +89 -0
- package/.opencode/command/speckit.specify.md +258 -0
- package/.opencode/command/speckit.tasks.md +137 -0
- package/.opencode/command/speckit.taskstoissues.md +30 -0
- package/.specify/memory/constitution.md +58 -0
- package/.specify/scripts/powershell/check-prerequisites.ps1 +148 -0
- package/.specify/scripts/powershell/common.ps1 +137 -0
- package/.specify/scripts/powershell/create-new-feature.ps1 +283 -0
- package/.specify/scripts/powershell/setup-plan.ps1 +61 -0
- package/.specify/scripts/powershell/update-agent-context.ps1 +448 -0
- package/.specify/templates/agent-file-template.md +28 -0
- package/.specify/templates/checklist-template.md +40 -0
- package/.specify/templates/constitution-template.md +50 -0
- package/.specify/templates/plan-template.md +104 -0
- package/.specify/templates/spec-template.md +115 -0
- package/.specify/templates/tasks-template.md +251 -0
- package/.vscode/launch.json +14 -0
- package/.vscode/settings.json +14 -0
- package/.vscode/tasks.json +15 -0
- package/CLAUDE.md +64 -0
- package/README.md +176 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +31 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/services/apiClient.d.ts +14 -0
- package/dist/services/apiClient.d.ts.map +1 -0
- package/dist/services/apiClient.js +41 -0
- package/dist/services/apiClient.js.map +1 -0
- package/dist/tools/accounts.d.ts +3 -0
- package/dist/tools/accounts.d.ts.map +1 -0
- package/dist/tools/accounts.js +77 -0
- package/dist/tools/accounts.js.map +1 -0
- package/dist/tools/categories.d.ts +3 -0
- package/dist/tools/categories.d.ts.map +1 -0
- package/dist/tools/categories.js +57 -0
- package/dist/tools/categories.js.map +1 -0
- package/dist/tools/credit-cards.d.ts +3 -0
- package/dist/tools/credit-cards.d.ts.map +1 -0
- package/dist/tools/credit-cards.js +93 -0
- package/dist/tools/credit-cards.js.map +1 -0
- package/dist/tools/data.d.ts +3 -0
- package/dist/tools/data.d.ts.map +1 -0
- package/dist/tools/data.js +27 -0
- package/dist/tools/data.js.map +1 -0
- package/dist/tools/settings.d.ts +3 -0
- package/dist/tools/settings.d.ts.map +1 -0
- package/dist/tools/settings.js +37 -0
- package/dist/tools/settings.js.map +1 -0
- package/dist/tools/summary.d.ts +3 -0
- package/dist/tools/summary.d.ts.map +1 -0
- package/dist/tools/summary.js +23 -0
- package/dist/tools/summary.js.map +1 -0
- package/dist/tools/transactions.d.ts +3 -0
- package/dist/tools/transactions.d.ts.map +1 -0
- package/dist/tools/transactions.js +102 -0
- package/dist/tools/transactions.js.map +1 -0
- package/dist/types/schemas.d.ts +330 -0
- package/dist/types/schemas.d.ts.map +1 -0
- package/dist/types/schemas.js +206 -0
- package/dist/types/schemas.js.map +1 -0
- package/openapi.yaml +1786 -0
- package/package.json +41 -0
- package/specs/001-mcp-api-integration/checklists/requirements.md +34 -0
- package/specs/001-mcp-api-integration/contracts/openapi.yaml +636 -0
- package/specs/001-mcp-api-integration/data-model.md +106 -0
- package/specs/001-mcp-api-integration/plan.md +73 -0
- package/specs/001-mcp-api-integration/quickstart.md +74 -0
- package/specs/001-mcp-api-integration/research.md +58 -0
- package/specs/001-mcp-api-integration/spec.md +119 -0
- package/specs/001-mcp-api-integration/tasks.md +64 -0
- package/src/config.ts +36 -0
- package/src/index.ts +47 -0
- package/src/services/apiClient.ts +49 -0
- package/src/tools/accounts.ts +111 -0
- package/src/tools/categories.ts +81 -0
- package/src/tools/credit-cards.ts +132 -0
- package/src/tools/data.ts +36 -0
- package/src/tools/settings.ts +51 -0
- package/src/tools/summary.ts +24 -0
- package/src/tools/transactions.ts +128 -0
- package/src/types/schemas.ts +230 -0
- package/tests/benchmark.test.d.ts +2 -0
- package/tests/benchmark.test.d.ts.map +1 -0
- package/tests/benchmark.test.js +33 -0
- package/tests/benchmark.test.js.map +1 -0
- package/tests/benchmark.test.ts +38 -0
- package/tests/server.test.d.ts +2 -0
- package/tests/server.test.d.ts.map +1 -0
- package/tests/server.test.js +13 -0
- package/tests/server.test.js.map +1 -0
- package/tests/server.test.ts +14 -0
- package/tests/setup.d.ts +4 -0
- package/tests/setup.d.ts.map +1 -0
- package/tests/setup.js +17 -0
- package/tests/setup.js.map +1 -0
- package/tests/setup.ts +20 -0
- package/tests/tools/accounts.test.ts +118 -0
- package/tests/tools/categories.test.d.ts +2 -0
- package/tests/tools/categories.test.d.ts.map +1 -0
- package/tests/tools/categories.test.js +63 -0
- package/tests/tools/categories.test.js.map +1 -0
- package/tests/tools/categories.test.ts +78 -0
- package/tests/tools/credit-cards.test.d.ts +2 -0
- package/tests/tools/credit-cards.test.d.ts.map +1 -0
- package/tests/tools/credit-cards.test.js +71 -0
- package/tests/tools/credit-cards.test.js.map +1 -0
- package/tests/tools/credit-cards.test.ts +89 -0
- package/tests/tools/summary.test.d.ts +2 -0
- package/tests/tools/summary.test.d.ts.map +1 -0
- package/tests/tools/summary.test.js +36 -0
- package/tests/tools/summary.test.js.map +1 -0
- package/tests/tools/summary.test.ts +42 -0
- package/tests/tools/transactions.test.d.ts +2 -0
- package/tests/tools/transactions.test.d.ts.map +1 -0
- package/tests/tools/transactions.test.js +67 -0
- package/tests/tools/transactions.test.js.map +1 -0
- package/tests/tools/transactions.test.ts +82 -0
- package/tsconfig.json +52 -0
- package/vitest.config.d.ts +3 -0
- package/vitest.config.d.ts.map +1 -0
- package/vitest.config.js +14 -0
- package/vitest.config.js.map +1 -0
- package/vitest.config.ts +14 -0
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "quantix-mcp",
|
|
3
|
+
"version": "0.3.6",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"quantix-mcp": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"start": "node dist/index.js",
|
|
12
|
+
"dev": "tsx src/index.ts",
|
|
13
|
+
"test": "vitest"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "MNunes",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"description": "A simple Model Context Protocol (MCP) server that provides functionalities for financial data management using the Quantix API.",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/node": "^25.0.10",
|
|
21
|
+
"ts-node": "^10.9.2",
|
|
22
|
+
"tsx": "^4.21.0",
|
|
23
|
+
"typescript": "^5.9.3",
|
|
24
|
+
"vitest": "^4.0.18"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@modelcontextprotocol/sdk": "1.25.0",
|
|
28
|
+
"@types/express": "^5.0.6",
|
|
29
|
+
"dotenv": "^17.2.3",
|
|
30
|
+
"express": "^5.2.1",
|
|
31
|
+
"zod": "^4.3.6"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/marcosnunesmbs/quantix-mcp.git"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/marcosnunesmbs/quantix-mcp/issues"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/marcosnunesmbs/quantix-mcp#readme"
|
|
41
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Specification Quality Checklist: MCP Server for Quantix API Integration
|
|
2
|
+
|
|
3
|
+
**Purpose**: Validate specification completeness and quality before proceeding to planning
|
|
4
|
+
**Created**: 2026-01-31
|
|
5
|
+
**Feature**: [spec.md](../spec.md)
|
|
6
|
+
|
|
7
|
+
## Content Quality
|
|
8
|
+
|
|
9
|
+
- [x] No implementation details (languages, frameworks, APIs)
|
|
10
|
+
- [x] Focused on user value and business needs
|
|
11
|
+
- [x] Written for non-technical stakeholders
|
|
12
|
+
- [x] All mandatory sections completed
|
|
13
|
+
|
|
14
|
+
## Requirement Completeness
|
|
15
|
+
|
|
16
|
+
- [x] No [NEEDS CLARIFICATION] markers remain
|
|
17
|
+
- [x] Requirements are testable and unambiguous
|
|
18
|
+
- [x] Success criteria are measurable
|
|
19
|
+
- [x] Success criteria are technology-agnostic (no implementation details)
|
|
20
|
+
- [x] All acceptance scenarios are defined
|
|
21
|
+
- [x] Edge cases are identified
|
|
22
|
+
- [x] Scope is clearly bounded
|
|
23
|
+
- [x] Dependencies and assumptions identified
|
|
24
|
+
|
|
25
|
+
## Feature Readiness
|
|
26
|
+
|
|
27
|
+
- [x] All functional requirements have clear acceptance criteria
|
|
28
|
+
- [x] User scenarios cover primary flows
|
|
29
|
+
- [x] Feature meets measurable outcomes defined in Success Criteria
|
|
30
|
+
- [x] No implementation details leak into specification
|
|
31
|
+
|
|
32
|
+
## Notes
|
|
33
|
+
|
|
34
|
+
- Feature describes the creation of a technical component (MCP Server), so technical terms (MCP, API, Zod) are part of the domain requirements as per user request.
|
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
openapi: 3.0.0
|
|
2
|
+
info:
|
|
3
|
+
title: Quantix Personal Finance Manager API
|
|
4
|
+
description: API for managing personal finances including transactions, credit cards, categories, and recurring payments
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
contact:
|
|
7
|
+
name: Quantix Support
|
|
8
|
+
email: support@quantix.example.com
|
|
9
|
+
|
|
10
|
+
servers:
|
|
11
|
+
- url: https://api.quantix.example.com
|
|
12
|
+
description: Production server
|
|
13
|
+
- url: https://staging.quantix.example.com
|
|
14
|
+
description: Staging server
|
|
15
|
+
|
|
16
|
+
components:
|
|
17
|
+
securitySchemes:
|
|
18
|
+
ApiKeyAuth:
|
|
19
|
+
type: apiKey
|
|
20
|
+
in: header
|
|
21
|
+
name: API-KEY
|
|
22
|
+
description: API key for authentication, configured via QUANTIX_API_KEY environment variable
|
|
23
|
+
|
|
24
|
+
schemas:
|
|
25
|
+
Category:
|
|
26
|
+
type: object
|
|
27
|
+
required:
|
|
28
|
+
- name
|
|
29
|
+
- type
|
|
30
|
+
properties:
|
|
31
|
+
id:
|
|
32
|
+
type: string
|
|
33
|
+
description: Unique identifier for the category
|
|
34
|
+
example: "cat_123456789"
|
|
35
|
+
name:
|
|
36
|
+
type: string
|
|
37
|
+
description: Name of the category
|
|
38
|
+
example: "Groceries"
|
|
39
|
+
type:
|
|
40
|
+
type: string
|
|
41
|
+
enum: [INCOME, EXPENSE]
|
|
42
|
+
description: Type of the category
|
|
43
|
+
example: "EXPENSE"
|
|
44
|
+
createdAt:
|
|
45
|
+
type: string
|
|
46
|
+
format: date-time
|
|
47
|
+
description: Timestamp when the category was created
|
|
48
|
+
example: "2026-01-30T10:00:00Z"
|
|
49
|
+
|
|
50
|
+
Transaction:
|
|
51
|
+
type: object
|
|
52
|
+
required:
|
|
53
|
+
- type
|
|
54
|
+
- name
|
|
55
|
+
- amount
|
|
56
|
+
- date
|
|
57
|
+
properties:
|
|
58
|
+
id:
|
|
59
|
+
type: string
|
|
60
|
+
description: Unique identifier for the transaction
|
|
61
|
+
example: "txn_123456789"
|
|
62
|
+
type:
|
|
63
|
+
type: string
|
|
64
|
+
enum: [INCOME, EXPENSE]
|
|
65
|
+
description: Type of the transaction
|
|
66
|
+
example: "EXPENSE"
|
|
67
|
+
name:
|
|
68
|
+
type: string
|
|
69
|
+
description: Description of the transaction
|
|
70
|
+
example: "Weekly groceries"
|
|
71
|
+
amount:
|
|
72
|
+
type: number
|
|
73
|
+
format: float
|
|
74
|
+
minimum: 0
|
|
75
|
+
description: Amount of the transaction
|
|
76
|
+
example: 125.75
|
|
77
|
+
date:
|
|
78
|
+
type: string
|
|
79
|
+
format: date
|
|
80
|
+
description: Date of the transaction
|
|
81
|
+
example: "2026-01-30"
|
|
82
|
+
categoryId:
|
|
83
|
+
type: string
|
|
84
|
+
description: ID of the associated category
|
|
85
|
+
example: "cat_123456789"
|
|
86
|
+
paymentMethod:
|
|
87
|
+
type: string
|
|
88
|
+
enum: [CASH, PIX, DEBIT, CREDIT]
|
|
89
|
+
description: Method of payment
|
|
90
|
+
example: "CREDIT"
|
|
91
|
+
creditCardId:
|
|
92
|
+
type: string
|
|
93
|
+
description: ID of the associated credit card (required if paymentMethod is CREDIT)
|
|
94
|
+
example: "cc_123456789"
|
|
95
|
+
installmentGroupId:
|
|
96
|
+
type: string
|
|
97
|
+
description: ID to group installment transactions
|
|
98
|
+
example: "ig_123456789"
|
|
99
|
+
installmentNumber:
|
|
100
|
+
type: integer
|
|
101
|
+
minimum: 1
|
|
102
|
+
description: Current installment number in a series
|
|
103
|
+
example: 2
|
|
104
|
+
installmentTotal:
|
|
105
|
+
type: integer
|
|
106
|
+
minimum: 1
|
|
107
|
+
description: Total number of installments in the series
|
|
108
|
+
example: 5
|
|
109
|
+
recurrenceRuleId:
|
|
110
|
+
type: string
|
|
111
|
+
description: ID of the associated recurrence rule
|
|
112
|
+
example: "rr_123456789"
|
|
113
|
+
paid:
|
|
114
|
+
type: boolean
|
|
115
|
+
default: false
|
|
116
|
+
description: Whether the transaction has been paid/received
|
|
117
|
+
example: true
|
|
118
|
+
createdAt:
|
|
119
|
+
type: string
|
|
120
|
+
format: date-time
|
|
121
|
+
description: Timestamp when the transaction was created
|
|
122
|
+
example: "2026-01-30T10:00:00Z"
|
|
123
|
+
|
|
124
|
+
CreditCard:
|
|
125
|
+
type: object
|
|
126
|
+
required:
|
|
127
|
+
- name
|
|
128
|
+
- limitAmount
|
|
129
|
+
- closingDay
|
|
130
|
+
- dueDay
|
|
131
|
+
properties:
|
|
132
|
+
id:
|
|
133
|
+
type: string
|
|
134
|
+
description: Unique identifier for the credit card
|
|
135
|
+
example: "cc_123456789"
|
|
136
|
+
name:
|
|
137
|
+
type: string
|
|
138
|
+
description: Name of the credit card
|
|
139
|
+
example: "Nubank Platinum"
|
|
140
|
+
brand:
|
|
141
|
+
type: string
|
|
142
|
+
description: Brand of the credit card
|
|
143
|
+
example: "Visa"
|
|
144
|
+
limitAmount:
|
|
145
|
+
type: number
|
|
146
|
+
format: float
|
|
147
|
+
minimum: 0
|
|
148
|
+
description: Credit limit of the card
|
|
149
|
+
example: 5000.00
|
|
150
|
+
closingDay:
|
|
151
|
+
type: integer
|
|
152
|
+
minimum: 1
|
|
153
|
+
maximum: 31
|
|
154
|
+
description: Day of the month when the billing cycle closes
|
|
155
|
+
example: 15
|
|
156
|
+
dueDay:
|
|
157
|
+
type: integer
|
|
158
|
+
minimum: 1
|
|
159
|
+
maximum: 31
|
|
160
|
+
description: Day of the month when the bill is due
|
|
161
|
+
example: 22
|
|
162
|
+
createdAt:
|
|
163
|
+
type: string
|
|
164
|
+
format: date-time
|
|
165
|
+
description: Timestamp when the credit card was added
|
|
166
|
+
example: "2026-01-30T10:00:00Z"
|
|
167
|
+
|
|
168
|
+
RecurrenceRule:
|
|
169
|
+
type: object
|
|
170
|
+
required:
|
|
171
|
+
- frequency
|
|
172
|
+
properties:
|
|
173
|
+
id:
|
|
174
|
+
type: string
|
|
175
|
+
description: Unique identifier for the recurrence rule
|
|
176
|
+
example: "rr_123456789"
|
|
177
|
+
frequency:
|
|
178
|
+
type: string
|
|
179
|
+
enum: [MONTHLY, WEEKLY, YEARLY]
|
|
180
|
+
description: Frequency of recurrence
|
|
181
|
+
example: "MONTHLY"
|
|
182
|
+
interval:
|
|
183
|
+
type: integer
|
|
184
|
+
minimum: 1
|
|
185
|
+
default: 1
|
|
186
|
+
description: Interval multiplier for the frequency
|
|
187
|
+
example: 1
|
|
188
|
+
endDate:
|
|
189
|
+
type: string
|
|
190
|
+
format: date
|
|
191
|
+
description: Date when the recurrence should end
|
|
192
|
+
example: "2026-12-31"
|
|
193
|
+
createdAt:
|
|
194
|
+
type: string
|
|
195
|
+
format: date-time
|
|
196
|
+
description: Timestamp when the recurrence rule was created
|
|
197
|
+
example: "2026-01-30T10:00:00Z"
|
|
198
|
+
|
|
199
|
+
Statement:
|
|
200
|
+
type: object
|
|
201
|
+
properties:
|
|
202
|
+
cardId:
|
|
203
|
+
type: string
|
|
204
|
+
description: ID of the credit card
|
|
205
|
+
example: "cc_123456789"
|
|
206
|
+
periodStart:
|
|
207
|
+
type: string
|
|
208
|
+
format: date
|
|
209
|
+
description: Start date of the billing period
|
|
210
|
+
example: "2026-02-16"
|
|
211
|
+
periodEnd:
|
|
212
|
+
type: string
|
|
213
|
+
format: date
|
|
214
|
+
description: End date of the billing period
|
|
215
|
+
example: "2026-03-15"
|
|
216
|
+
dueDate:
|
|
217
|
+
type: string
|
|
218
|
+
format: date
|
|
219
|
+
description: Due date of the statement
|
|
220
|
+
example: "2026-03-22"
|
|
221
|
+
transactions:
|
|
222
|
+
type: array
|
|
223
|
+
items:
|
|
224
|
+
$ref: '#/components/schemas/Transaction'
|
|
225
|
+
description: List of transactions in the statement period
|
|
226
|
+
total:
|
|
227
|
+
type: number
|
|
228
|
+
format: float
|
|
229
|
+
description: Total amount of the statement
|
|
230
|
+
example: 3450.00
|
|
231
|
+
availableLimit:
|
|
232
|
+
type: number
|
|
233
|
+
format: float
|
|
234
|
+
description: Available credit limit
|
|
235
|
+
example: 1550.00
|
|
236
|
+
|
|
237
|
+
Summary:
|
|
238
|
+
type: object
|
|
239
|
+
properties:
|
|
240
|
+
month:
|
|
241
|
+
type: string
|
|
242
|
+
description: Month for the summary (YYYY-MM format)
|
|
243
|
+
example: "2026-03"
|
|
244
|
+
income:
|
|
245
|
+
type: number
|
|
246
|
+
format: float
|
|
247
|
+
description: Total income for the month
|
|
248
|
+
example: 10000.00
|
|
249
|
+
expenses:
|
|
250
|
+
type: number
|
|
251
|
+
format: float
|
|
252
|
+
description: Total expenses for the month
|
|
253
|
+
example: 4000.00
|
|
254
|
+
creditCardStatements:
|
|
255
|
+
type: array
|
|
256
|
+
items:
|
|
257
|
+
type: object
|
|
258
|
+
properties:
|
|
259
|
+
cardName:
|
|
260
|
+
type: string
|
|
261
|
+
description: Name of the credit card
|
|
262
|
+
example: "Nubank"
|
|
263
|
+
dueDate:
|
|
264
|
+
type: string
|
|
265
|
+
format: date
|
|
266
|
+
description: Due date of the statement
|
|
267
|
+
example: "2026-03-22"
|
|
268
|
+
total:
|
|
269
|
+
type: number
|
|
270
|
+
format: float
|
|
271
|
+
description: Total amount of the statement
|
|
272
|
+
example: 2500.00
|
|
273
|
+
balance:
|
|
274
|
+
type: number
|
|
275
|
+
format: float
|
|
276
|
+
description: Net balance (income - expenses)
|
|
277
|
+
example: 3500.00
|
|
278
|
+
|
|
279
|
+
CreateTransactionRequest:
|
|
280
|
+
type: object
|
|
281
|
+
required:
|
|
282
|
+
- type
|
|
283
|
+
- name
|
|
284
|
+
- amount
|
|
285
|
+
- date
|
|
286
|
+
properties:
|
|
287
|
+
type:
|
|
288
|
+
$ref: '#/components/schemas/Transaction/properties/type'
|
|
289
|
+
name:
|
|
290
|
+
$ref: '#/components/schemas/Transaction/properties/name'
|
|
291
|
+
amount:
|
|
292
|
+
$ref: '#/components/schemas/Transaction/properties/amount'
|
|
293
|
+
date:
|
|
294
|
+
$ref: '#/components/schemas/Transaction/properties/date'
|
|
295
|
+
categoryId:
|
|
296
|
+
$ref: '#/components/schemas/Transaction/properties/categoryId'
|
|
297
|
+
paymentMethod:
|
|
298
|
+
$ref: '#/components/schemas/Transaction/properties/paymentMethod'
|
|
299
|
+
creditCardId:
|
|
300
|
+
$ref: '#/components/schemas/Transaction/properties/creditCardId'
|
|
301
|
+
installments:
|
|
302
|
+
type: integer
|
|
303
|
+
minimum: 1
|
|
304
|
+
description: Number of installments (optional)
|
|
305
|
+
example: 3
|
|
306
|
+
targetDueMonth:
|
|
307
|
+
type: string
|
|
308
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
309
|
+
description: Target month for due date in YYYY-MM format (optional)
|
|
310
|
+
example: "2026-03"
|
|
311
|
+
recurrence:
|
|
312
|
+
type: object
|
|
313
|
+
properties:
|
|
314
|
+
frequency:
|
|
315
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/frequency'
|
|
316
|
+
interval:
|
|
317
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/interval'
|
|
318
|
+
endDate:
|
|
319
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/endDate'
|
|
320
|
+
|
|
321
|
+
responses:
|
|
322
|
+
UnauthorizedError:
|
|
323
|
+
description: API key is missing or invalid
|
|
324
|
+
content:
|
|
325
|
+
application/json:
|
|
326
|
+
schema:
|
|
327
|
+
type: object
|
|
328
|
+
properties:
|
|
329
|
+
statusCode:
|
|
330
|
+
type: integer
|
|
331
|
+
example: 401
|
|
332
|
+
error:
|
|
333
|
+
type: string
|
|
334
|
+
example: "Unauthorized"
|
|
335
|
+
message:
|
|
336
|
+
type: string
|
|
337
|
+
example: "Invalid API key"
|
|
338
|
+
|
|
339
|
+
security:
|
|
340
|
+
- ApiKeyAuth: []
|
|
341
|
+
|
|
342
|
+
paths:
|
|
343
|
+
/categories:
|
|
344
|
+
post:
|
|
345
|
+
summary: Create a new category
|
|
346
|
+
requestBody:
|
|
347
|
+
required: true
|
|
348
|
+
content:
|
|
349
|
+
application/json:
|
|
350
|
+
schema:
|
|
351
|
+
type: object
|
|
352
|
+
required:
|
|
353
|
+
- name
|
|
354
|
+
- type
|
|
355
|
+
properties:
|
|
356
|
+
name:
|
|
357
|
+
type: string
|
|
358
|
+
example: "Groceries"
|
|
359
|
+
type:
|
|
360
|
+
type: string
|
|
361
|
+
enum: [INCOME, EXPENSE]
|
|
362
|
+
example: "EXPENSE"
|
|
363
|
+
responses:
|
|
364
|
+
'201':
|
|
365
|
+
description: Category created successfully
|
|
366
|
+
content:
|
|
367
|
+
application/json:
|
|
368
|
+
schema:
|
|
369
|
+
$ref: '#/components/schemas/Category'
|
|
370
|
+
'400':
|
|
371
|
+
description: Invalid input
|
|
372
|
+
'401':
|
|
373
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
374
|
+
|
|
375
|
+
get:
|
|
376
|
+
summary: Get all categories
|
|
377
|
+
responses:
|
|
378
|
+
'200':
|
|
379
|
+
description: List of categories
|
|
380
|
+
content:
|
|
381
|
+
application/json:
|
|
382
|
+
schema:
|
|
383
|
+
type: array
|
|
384
|
+
items:
|
|
385
|
+
$ref: '#/components/schemas/Category'
|
|
386
|
+
'401':
|
|
387
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
388
|
+
|
|
389
|
+
/categories/{id}:
|
|
390
|
+
delete:
|
|
391
|
+
summary: Delete a category
|
|
392
|
+
parameters:
|
|
393
|
+
- name: id
|
|
394
|
+
in: path
|
|
395
|
+
required: true
|
|
396
|
+
schema:
|
|
397
|
+
type: string
|
|
398
|
+
description: Category ID
|
|
399
|
+
responses:
|
|
400
|
+
'200':
|
|
401
|
+
description: Category deleted successfully
|
|
402
|
+
'401':
|
|
403
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
404
|
+
'404':
|
|
405
|
+
description: Category not found
|
|
406
|
+
|
|
407
|
+
/credit-cards:
|
|
408
|
+
post:
|
|
409
|
+
summary: Create a new credit card
|
|
410
|
+
requestBody:
|
|
411
|
+
required: true
|
|
412
|
+
content:
|
|
413
|
+
application/json:
|
|
414
|
+
schema:
|
|
415
|
+
type: object
|
|
416
|
+
required:
|
|
417
|
+
- name
|
|
418
|
+
- limitAmount
|
|
419
|
+
- closingDay
|
|
420
|
+
- dueDay
|
|
421
|
+
properties:
|
|
422
|
+
name:
|
|
423
|
+
type: string
|
|
424
|
+
example: "Nubank Platinum"
|
|
425
|
+
brand:
|
|
426
|
+
type: string
|
|
427
|
+
example: "Visa"
|
|
428
|
+
limitAmount:
|
|
429
|
+
type: number
|
|
430
|
+
format: float
|
|
431
|
+
example: 5000.00
|
|
432
|
+
closingDay:
|
|
433
|
+
type: integer
|
|
434
|
+
minimum: 1
|
|
435
|
+
maximum: 31
|
|
436
|
+
example: 15
|
|
437
|
+
dueDay:
|
|
438
|
+
type: integer
|
|
439
|
+
minimum: 1
|
|
440
|
+
maximum: 31
|
|
441
|
+
example: 22
|
|
442
|
+
responses:
|
|
443
|
+
'201':
|
|
444
|
+
description: Credit card created successfully
|
|
445
|
+
content:
|
|
446
|
+
application/json:
|
|
447
|
+
schema:
|
|
448
|
+
$ref: '#/components/schemas/CreditCard'
|
|
449
|
+
'400':
|
|
450
|
+
description: Invalid input
|
|
451
|
+
'401':
|
|
452
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
453
|
+
|
|
454
|
+
get:
|
|
455
|
+
summary: Get all credit cards
|
|
456
|
+
responses:
|
|
457
|
+
'200':
|
|
458
|
+
description: List of credit cards
|
|
459
|
+
content:
|
|
460
|
+
application/json:
|
|
461
|
+
schema:
|
|
462
|
+
type: array
|
|
463
|
+
items:
|
|
464
|
+
$ref: '#/components/schemas/CreditCard'
|
|
465
|
+
'401':
|
|
466
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
467
|
+
|
|
468
|
+
/credit-cards/{id}/statement:
|
|
469
|
+
get:
|
|
470
|
+
summary: Get credit card statement for a specific month
|
|
471
|
+
parameters:
|
|
472
|
+
- name: id
|
|
473
|
+
in: path
|
|
474
|
+
required: true
|
|
475
|
+
schema:
|
|
476
|
+
type: string
|
|
477
|
+
description: Credit card ID
|
|
478
|
+
- name: month
|
|
479
|
+
in: query
|
|
480
|
+
required: true
|
|
481
|
+
schema:
|
|
482
|
+
type: string
|
|
483
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
484
|
+
description: Month in YYYY-MM format
|
|
485
|
+
example: "2026-03"
|
|
486
|
+
responses:
|
|
487
|
+
'200':
|
|
488
|
+
description: Credit card statement
|
|
489
|
+
content:
|
|
490
|
+
application/json:
|
|
491
|
+
schema:
|
|
492
|
+
$ref: '#/components/schemas/Statement'
|
|
493
|
+
'401':
|
|
494
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
495
|
+
'404':
|
|
496
|
+
description: Credit card not found
|
|
497
|
+
|
|
498
|
+
/credit-cards/{id}/pay-statement:
|
|
499
|
+
post:
|
|
500
|
+
summary: Mark all transactions in a credit card statement as paid
|
|
501
|
+
parameters:
|
|
502
|
+
- name: id
|
|
503
|
+
in: path
|
|
504
|
+
required: true
|
|
505
|
+
schema:
|
|
506
|
+
type: string
|
|
507
|
+
description: Credit card ID
|
|
508
|
+
- name: month
|
|
509
|
+
in: query
|
|
510
|
+
required: true
|
|
511
|
+
schema:
|
|
512
|
+
type: string
|
|
513
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
514
|
+
description: Month in YYYY-MM format
|
|
515
|
+
example: "2026-03"
|
|
516
|
+
responses:
|
|
517
|
+
'200':
|
|
518
|
+
description: Statement marked as paid
|
|
519
|
+
content:
|
|
520
|
+
application/json:
|
|
521
|
+
schema:
|
|
522
|
+
type: object
|
|
523
|
+
properties:
|
|
524
|
+
message:
|
|
525
|
+
type: string
|
|
526
|
+
example: "Statement for March 2026 marked as paid"
|
|
527
|
+
'401':
|
|
528
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
529
|
+
'404':
|
|
530
|
+
description: Credit card or statement not found
|
|
531
|
+
|
|
532
|
+
/transactions:
|
|
533
|
+
post:
|
|
534
|
+
summary: Create a new transaction
|
|
535
|
+
requestBody:
|
|
536
|
+
required: true
|
|
537
|
+
content:
|
|
538
|
+
application/json:
|
|
539
|
+
schema:
|
|
540
|
+
$ref: '#/components/schemas/CreateTransactionRequest'
|
|
541
|
+
responses:
|
|
542
|
+
'201':
|
|
543
|
+
description: Transaction created successfully
|
|
544
|
+
content:
|
|
545
|
+
application/json:
|
|
546
|
+
schema:
|
|
547
|
+
$ref: '#/components/schemas/Transaction'
|
|
548
|
+
'400':
|
|
549
|
+
description: Invalid input
|
|
550
|
+
'401':
|
|
551
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
552
|
+
|
|
553
|
+
get:
|
|
554
|
+
summary: Get all transactions
|
|
555
|
+
parameters:
|
|
556
|
+
- name: month
|
|
557
|
+
in: query
|
|
558
|
+
required: false
|
|
559
|
+
schema:
|
|
560
|
+
type: string
|
|
561
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
562
|
+
description: Filter transactions by month (YYYY-MM format)
|
|
563
|
+
example: "2026-03"
|
|
564
|
+
responses:
|
|
565
|
+
'200':
|
|
566
|
+
description: List of transactions
|
|
567
|
+
content:
|
|
568
|
+
application/json:
|
|
569
|
+
schema:
|
|
570
|
+
type: array
|
|
571
|
+
items:
|
|
572
|
+
$ref: '#/components/schemas/Transaction'
|
|
573
|
+
'401':
|
|
574
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
575
|
+
|
|
576
|
+
/transactions/{id}/pay:
|
|
577
|
+
patch:
|
|
578
|
+
summary: Mark a transaction as paid/received
|
|
579
|
+
parameters:
|
|
580
|
+
- name: id
|
|
581
|
+
in: path
|
|
582
|
+
required: true
|
|
583
|
+
schema:
|
|
584
|
+
type: string
|
|
585
|
+
description: Transaction ID
|
|
586
|
+
responses:
|
|
587
|
+
'200':
|
|
588
|
+
description: Transaction marked as paid
|
|
589
|
+
content:
|
|
590
|
+
application/json:
|
|
591
|
+
schema:
|
|
592
|
+
$ref: '#/components/schemas/Transaction'
|
|
593
|
+
'401':
|
|
594
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
595
|
+
'404':
|
|
596
|
+
description: Transaction not found
|
|
597
|
+
|
|
598
|
+
/transactions/{id}:
|
|
599
|
+
delete:
|
|
600
|
+
summary: Delete a transaction
|
|
601
|
+
parameters:
|
|
602
|
+
- name: id
|
|
603
|
+
in: path
|
|
604
|
+
required: true
|
|
605
|
+
schema:
|
|
606
|
+
type: string
|
|
607
|
+
description: Transaction ID
|
|
608
|
+
responses:
|
|
609
|
+
'200':
|
|
610
|
+
description: Transaction deleted successfully
|
|
611
|
+
'401':
|
|
612
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
613
|
+
'404':
|
|
614
|
+
description: Transaction not found
|
|
615
|
+
|
|
616
|
+
/summary:
|
|
617
|
+
get:
|
|
618
|
+
summary: Get monthly financial summary
|
|
619
|
+
parameters:
|
|
620
|
+
- name: month
|
|
621
|
+
in: query
|
|
622
|
+
required: true
|
|
623
|
+
schema:
|
|
624
|
+
type: string
|
|
625
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
626
|
+
description: Month in YYYY-MM format
|
|
627
|
+
example: "2026-03"
|
|
628
|
+
responses:
|
|
629
|
+
'200':
|
|
630
|
+
description: Monthly financial summary
|
|
631
|
+
content:
|
|
632
|
+
application/json:
|
|
633
|
+
schema:
|
|
634
|
+
$ref: '#/components/schemas/Summary'
|
|
635
|
+
'401':
|
|
636
|
+
$ref: '#/components/responses/UnauthorizedError'
|