quantix-mcp 0.3.6 → 0.3.7

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/openapi.yaml CHANGED
@@ -1014,6 +1014,48 @@ paths:
1014
1014
  '404':
1015
1015
  description: Credit card not found
1016
1016
 
1017
+ /credit-cards/{id}/reopen-statement:
1018
+ post:
1019
+ summary: Reopen a credit card statement by marking all transactions as unpaid
1020
+ parameters:
1021
+ - name: id
1022
+ in: path
1023
+ required: true
1024
+ schema:
1025
+ type: string
1026
+ description: Credit card ID
1027
+ requestBody:
1028
+ required: true
1029
+ content:
1030
+ application/json:
1031
+ schema:
1032
+ type: object
1033
+ required:
1034
+ - month
1035
+ properties:
1036
+ month:
1037
+ type: string
1038
+ pattern: "^\\d{4}-\\d{2}$"
1039
+ description: Month in YYYY-MM format
1040
+ example: "2026-03"
1041
+ responses:
1042
+ '200':
1043
+ description: Statement reopened successfully
1044
+ content:
1045
+ application/json:
1046
+ schema:
1047
+ type: object
1048
+ properties:
1049
+ message:
1050
+ type: string
1051
+ example: "Statement for 2026-03 successfully reopened. 5 transaction(s) marked as unpaid."
1052
+ '400':
1053
+ description: Invalid input or statement is already open
1054
+ '401':
1055
+ $ref: '#/components/responses/UnauthorizedError'
1056
+ '404':
1057
+ description: Credit card not found
1058
+
1017
1059
  /credit-cards/{id}/statement-status:
1018
1060
  get:
1019
1061
  summary: Get credit card statement payment status for a specific month
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantix-mcp",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "quantix-mcp": "./dist/index.js"
@@ -1,6 +1,6 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { z } from 'zod';
3
- import { CreateCreditCardInput, UpdateCreditCardInput, PayStatementInput } from '../types/schemas.js';
3
+ import { CreateCreditCardInput, UpdateCreditCardInput, PayStatementInput, ReopenStatementInput } from '../types/schemas.js';
4
4
  import { apiClient } from '../services/apiClient.js';
5
5
 
6
6
  export function registerCreditCardTools(server: McpServer) {
@@ -112,6 +112,21 @@ export function registerCreditCardTools(server: McpServer) {
112
112
  }
113
113
  );
114
114
 
115
+ server.registerTool(
116
+ 'reopen_statement',
117
+ {
118
+ title: 'Reopen Statement',
119
+ description: 'Reopen a credit card statement by marking all transactions as unpaid',
120
+ inputSchema: ReopenStatementInput
121
+ },
122
+ async ({ cardId, month }) => {
123
+ const result = await apiClient.post(`/credit-cards/${cardId}/reopen-statement`, { month });
124
+ return {
125
+ content: [{ type: 'text', text: `Statement reopened: ${JSON.stringify(result, null, 2)}` }]
126
+ };
127
+ }
128
+ );
129
+
115
130
  server.registerTool(
116
131
  'get_statement_status',
117
132
  {
@@ -197,6 +197,11 @@ export const PayStatementInput = z.object({
197
197
  paymentAccountId: z.string()
198
198
  });
199
199
 
200
+ export const ReopenStatementInput = z.object({
201
+ cardId: z.string().describe('Credit card ID'),
202
+ month: z.string().regex(/^\d{4}-\d{2}$/, "Format: YYYY-MM").describe('Month in YYYY-MM format')
203
+ });
204
+
200
205
  export const GetSummaryInput = z.object({
201
206
  month: z.string().regex(/^\d{4}-\d{2}$/, "Format: YYYY-MM").describe("Month in YYYY-MM format (use this OR startDate+endDate)").optional(),
202
207
  startDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).describe("Start date for custom range, YYYY-MM-DD (use with endDate)").optional(),