@comando.one/mcp-server 0.6.0 → 0.7.0

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.
Files changed (2) hide show
  1. package/dist/index.js +67 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -147,6 +147,8 @@ var MANIFEST = [
147
147
  { operationId: "setInvoiceAutoSend", tool: "invoices_set_auto_send", write: true },
148
148
  { operationId: "listInvoiceCharges", tool: "invoices_list_charges" },
149
149
  { operationId: "settleInvoiceCharge", tool: "invoices_settle_charge", write: true },
150
+ { operationId: "listChargePayments", tool: "invoices_list_charge_payments" },
151
+ { operationId: "reverseChargePayment", tool: "invoices_reverse_payment", write: true, destructive: true },
150
152
  { operationId: "generateContractInvoices", tool: "contracts_generate_invoices", write: true },
151
153
  // ----- Cobranças -----
152
154
  { operationId: "listCharges", tool: "charges_list" },
@@ -2162,6 +2164,71 @@ var OPENAPI_SPEC = {
2162
2164
  }
2163
2165
  }
2164
2166
  },
2167
+ "/invoices/{id}/charges/{charge_id}/payments": {
2168
+ parameters: [
2169
+ { name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } },
2170
+ { name: "charge_id", in: "path", required: true, schema: { type: "string", format: "uuid" } }
2171
+ ],
2172
+ get: {
2173
+ tags: ["Faturas"],
2174
+ summary: "Listar as baixas de uma parcela",
2175
+ operationId: "listChargePayments",
2176
+ description: "Os recebimentos j\xE1 registrados na parcela. `reconciled: true` avisa que aquele pagamento est\xE1 conciliado com o extrato \u2014 o estorno dele ser\xE1 recusado at\xE9 a concilia\xE7\xE3o ser desfeita.",
2177
+ security: [{ ApiKeyAuth: ["invoices:read"] }],
2178
+ responses: { "200": { description: "Baixas da parcela", content: { "application/json": { schema: { type: "object", properties: {
2179
+ invoice_id: { type: "string" },
2180
+ charge_id: { type: "string" },
2181
+ charge_amount: { type: "number" },
2182
+ charge_payment_status: { type: "string" },
2183
+ paid_amount: { type: "number" },
2184
+ remaining_amount: { type: "number" },
2185
+ total: { type: "integer" },
2186
+ payments: { type: "array", items: { type: "object", properties: {
2187
+ payment_id: { type: "string" },
2188
+ allocation_id: { type: "string" },
2189
+ amount: { type: "number" },
2190
+ payment_date: { type: "string", format: "date" },
2191
+ payment_total: { type: "number" },
2192
+ notes: { type: "string" },
2193
+ reconciled: { type: "boolean", description: "conciliado com o extrato \u2014 n\xE3o pode ser estornado por aqui" }
2194
+ } } }
2195
+ } } } } }, "404": errorResponse("Fatura ou parcela n\xE3o encontrada"), ...COMMON_ERRORS }
2196
+ }
2197
+ },
2198
+ "/invoices/{id}/charges/{charge_id}/payments/{payment_id}": {
2199
+ parameters: [
2200
+ { name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } },
2201
+ { name: "charge_id", in: "path", required: true, schema: { type: "string", format: "uuid" } },
2202
+ { name: "payment_id", in: "path", required: true, schema: { type: "string", format: "uuid" } }
2203
+ ],
2204
+ delete: {
2205
+ tags: ["Faturas"],
2206
+ summary: "Estornar uma baixa",
2207
+ operationId: "reverseChargePayment",
2208
+ description: "Desfaz um recebimento registrado na parcela. A parcela e a fatura voltam a `pendente`/`vencido`/`parcial` pelo pr\xF3prio banco. O pagamento \xE9 apagado quando existia s\xF3 para esta baixa; cobrindo outras faturas, perde apenas esta aloca\xE7\xE3o e tem o valor reduzido. RECUSA (409) se o pagamento estiver conciliado com o extrato ou se a parcela tiver gerado repasse (split) j\xE1 liberado ou pago \u2014 nos dois casos a resposta diz o que desfazer antes.",
2209
+ security: [{ ApiKeyAuth: ["invoices:settle"] }],
2210
+ responses: {
2211
+ "200": { description: "Baixa estornada", content: { "application/json": { schema: { type: "object", properties: {
2212
+ reversed_payment_id: { type: "string" },
2213
+ reversed_amount: { type: "number" },
2214
+ payment_deleted: { type: "boolean", description: "false = o pagamento cobria outras faturas e foi s\xF3 reduzido" },
2215
+ invoice_id: { type: "string" },
2216
+ invoice_number: { type: "string" },
2217
+ invoice_payment_status: { type: "string" },
2218
+ charge: { type: "object", properties: {
2219
+ id: { type: "string" },
2220
+ amount: { type: "number" },
2221
+ paid_amount: { type: "number" },
2222
+ remaining_amount: { type: "number" },
2223
+ payment_status: { type: "string" }
2224
+ } }
2225
+ } } } } },
2226
+ "404": errorResponse("Fatura, parcela ou baixa n\xE3o encontrada"),
2227
+ "409": errorResponse("Pagamento conciliado com o extrato, ou repasse (split) liberado/pago"),
2228
+ ...COMMON_ERRORS
2229
+ }
2230
+ }
2231
+ },
2165
2232
  "/invoices/{id}/send": {
2166
2233
  parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
2167
2234
  post: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comando.one/mcp-server",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Servidor MCP (Model Context Protocol) para a API pública do Comando.One — opere seu ERP por linguagem natural.",
5
5
  "type": "module",
6
6
  "license": "MIT",