@comando.one/mcp-server 0.9.0 → 0.10.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.
- package/dist/index.js +157 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -218,6 +218,7 @@ var MANIFEST = [
|
|
|
218
218
|
{ operationId: "listDueReadjustments", tool: "contracts_readjustments_due" },
|
|
219
219
|
{ operationId: "listContractReadjustments", tool: "contracts_readjustments_list" },
|
|
220
220
|
{ operationId: "applyContractReadjustment", tool: "contracts_readjustments_apply", write: true, destructive: true },
|
|
221
|
+
{ operationId: "revertContractReadjustment", tool: "contracts_readjustments_revert", write: true, destructive: true },
|
|
221
222
|
{ operationId: "getMarketIndices", tool: "market_indices_get" },
|
|
222
223
|
// Faturas — exclusão física
|
|
223
224
|
{ operationId: "deleteInvoice", tool: "invoices_delete", write: true, destructive: true },
|
|
@@ -277,6 +278,15 @@ var MANIFEST = [
|
|
|
277
278
|
{ operationId: "deleteFinancialMovement", tool: "finance_delete_movement", write: true, destructive: true },
|
|
278
279
|
// Módulos operacionais que tinham tela e nenhuma exposição (COBERTURA.md item 1).
|
|
279
280
|
// Somente leitura — escrever em conciliação/cartão/DDA mexe em dinheiro e entra depois.
|
|
281
|
+
{ operationId: "updateInboxMessageStatus", tool: "inbox_messages_update_status", write: true },
|
|
282
|
+
{ operationId: "deleteReconciliationMatch", tool: "reconciliation_unmatch", write: true, destructive: true },
|
|
283
|
+
{ operationId: "triageDdaBoleto", tool: "dda_boletos_triage", write: true },
|
|
284
|
+
{ operationId: "updateRecurringExpenseStatus", tool: "recurring_expenses_set_status", write: true },
|
|
285
|
+
{ operationId: "updateRecurringPurchaseInvoiceStatus", tool: "recurring_purchase_invoices_set_status", write: true },
|
|
286
|
+
{ operationId: "updateNotificationRead", tool: "notifications_mark_read", write: true },
|
|
287
|
+
{ operationId: "createInsumo", tool: "insumos_create", write: true },
|
|
288
|
+
{ operationId: "updateInsumo", tool: "insumos_update", write: true },
|
|
289
|
+
{ operationId: "deleteInsumo", tool: "insumos_delete", write: true, destructive: true },
|
|
280
290
|
{ operationId: "listInboxMessages", tool: "inbox_messages_list" },
|
|
281
291
|
{ operationId: "getInboxMessage", tool: "inbox_messages_get" },
|
|
282
292
|
{ operationId: "listInboxDocuments", tool: "inbox_documents_list" },
|
|
@@ -1152,6 +1162,17 @@ var SCHEMAS = {
|
|
|
1152
1162
|
updated_at: { type: "string", format: "date-time" }
|
|
1153
1163
|
}
|
|
1154
1164
|
},
|
|
1165
|
+
InsumoWrite: {
|
|
1166
|
+
type: "object",
|
|
1167
|
+
required: ["name"],
|
|
1168
|
+
properties: {
|
|
1169
|
+
name: { type: "string" },
|
|
1170
|
+
description: { type: "string" },
|
|
1171
|
+
unit: { type: "string", default: "un" },
|
|
1172
|
+
unit_price: { type: "number" },
|
|
1173
|
+
active: { type: "boolean", default: true }
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1155
1176
|
Insumo: {
|
|
1156
1177
|
type: "object",
|
|
1157
1178
|
properties: {
|
|
@@ -2203,6 +2224,25 @@ var OPENAPI_SPEC = {
|
|
|
2203
2224
|
}
|
|
2204
2225
|
}
|
|
2205
2226
|
},
|
|
2227
|
+
"/contracts/{id}/readjustments/{readjustmentId}": {
|
|
2228
|
+
parameters: [
|
|
2229
|
+
{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } },
|
|
2230
|
+
{ name: "readjustmentId", in: "path", required: true, schema: { type: "string", format: "uuid" } }
|
|
2231
|
+
],
|
|
2232
|
+
delete: {
|
|
2233
|
+
tags: ["Contratos"],
|
|
2234
|
+
summary: "Desfazer um reajuste aplicado",
|
|
2235
|
+
description: "Devolve o contrato ao valor anterior, restaura os itens ao estado gravado no momento da aplica\xE7\xE3o e recalcula a data do pr\xF3ximo reajuste. S\xF3 o reajuste mais recente ainda vigente pode ser desfeito, e apenas se o valor do contrato n\xE3o tiver sido alterado depois. A linha permanece no hist\xF3rico marcada como desfeita; faturas j\xE1 geradas n\xE3o s\xE3o alteradas.",
|
|
2236
|
+
operationId: "revertContractReadjustment",
|
|
2237
|
+
security: [{ ApiKeyAuth: ["contracts:write"] }],
|
|
2238
|
+
responses: {
|
|
2239
|
+
"200": { description: "Reajuste desfeito", content: { "application/json": { schema: { type: "object", properties: { reverted: { type: "boolean" }, contract_id: { type: "string", format: "uuid" }, restored_amount: { type: "number" }, items_exact: { type: "boolean", description: "false quando os itens voltaram por escala inversa (aproximada), por aus\xEAncia do registro anterior" } } } } } },
|
|
2240
|
+
"404": errorResponse("Reajuste ou contrato n\xE3o encontrado"),
|
|
2241
|
+
"409": errorResponse("N\xE3o \xE9 o reajuste mais recente, j\xE1 foi desfeito, ou o valor mudou depois"),
|
|
2242
|
+
...COMMON_ERRORS
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
},
|
|
2206
2246
|
"/market-indices": {
|
|
2207
2247
|
get: {
|
|
2208
2248
|
tags: ["Contratos"],
|
|
@@ -3483,6 +3523,87 @@ var OPENAPI_SPEC = {
|
|
|
3483
3523
|
// -----------------------------------------------------------------------
|
|
3484
3524
|
// Contas bancárias (read-only)
|
|
3485
3525
|
// -----------------------------------------------------------------------
|
|
3526
|
+
"/inbox/messages/{id}/status": {
|
|
3527
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3528
|
+
patch: {
|
|
3529
|
+
tags: ["Caixa de Entrada"],
|
|
3530
|
+
summary: "Reprocessar ou arquivar mensagem",
|
|
3531
|
+
operationId: "updateInboxMessageStatus",
|
|
3532
|
+
description: "`recebido` devolve a mensagem ao processamento (limpando o erro anterior); `ignorado` a arquiva. Os demais estados s\xE3o escritos pelo processamento, n\xE3o pelo cliente.",
|
|
3533
|
+
security: [{ ApiKeyAuth: ["inbox:update"] }],
|
|
3534
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["status"], properties: {
|
|
3535
|
+
status: { type: "string", enum: ["recebido", "ignorado"] }
|
|
3536
|
+
} } } } },
|
|
3537
|
+
responses: { "200": { description: "Mensagem atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/InboxMessage" } } } }, "404": errorResponse("Mensagem n\xE3o encontrada"), ...COMMON_ERRORS }
|
|
3538
|
+
}
|
|
3539
|
+
},
|
|
3540
|
+
"/reconciliation/matches/{id}": {
|
|
3541
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3542
|
+
delete: {
|
|
3543
|
+
tags: ["Concilia\xE7\xE3o"],
|
|
3544
|
+
summary: "Desfazer uma concilia\xE7\xE3o",
|
|
3545
|
+
operationId: "deleteReconciliationMatch",
|
|
3546
|
+
description: "Desconcilia o lan\xE7amento, pela mesma rotina que o bot\xE3o da tela usa. CONCILIAR n\xE3o \xE9 exposto na API: depende de a\xE7\xE3o/alvo/payload e merece desenho pr\xF3prio.",
|
|
3547
|
+
security: [{ ApiKeyAuth: ["reconciliation:write"] }],
|
|
3548
|
+
responses: { "200": { description: "Desconciliado", content: { "application/json": { schema: { type: "object", properties: { ok: { type: "boolean" }, match_id: { type: "string", format: "uuid" }, desconciliado: { type: "boolean" } } } } } }, "404": errorResponse("Concilia\xE7\xE3o n\xE3o encontrada"), ...COMMON_ERRORS }
|
|
3549
|
+
}
|
|
3550
|
+
},
|
|
3551
|
+
"/dda-boletos/{id}/triage": {
|
|
3552
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3553
|
+
post: {
|
|
3554
|
+
tags: ["DDA"],
|
|
3555
|
+
summary: "Arquivar ou reabrir boleto do DDA",
|
|
3556
|
+
operationId: "triageDdaBoleto",
|
|
3557
|
+
description: "`ignore` arquiva; `reopen` devolve \xE0 fila. As a\xE7\xF5es que criam ou vinculam documento (conta a pagar, fatura de cart\xE3o) e o bloqueio de benefici\xE1rio ficam no aplicativo \u2014 registram quem fez, e uma chave de API n\xE3o tem usu\xE1rio.",
|
|
3558
|
+
security: [{ ApiKeyAuth: ["dda:triage"] }],
|
|
3559
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["action"], properties: {
|
|
3560
|
+
action: { type: "string", enum: ["ignore", "reopen"] },
|
|
3561
|
+
note: { type: "string", description: "Observa\xE7\xE3o da triagem (s\xF3 em `ignore`)." }
|
|
3562
|
+
} } } } },
|
|
3563
|
+
responses: { "200": { description: "Boleto triado", content: { "application/json": { schema: { $ref: "#/components/schemas/DdaBoleto" } } } }, "404": errorResponse("Boleto n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3564
|
+
}
|
|
3565
|
+
},
|
|
3566
|
+
"/recurring-expenses/{id}/status": {
|
|
3567
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3568
|
+
patch: {
|
|
3569
|
+
tags: ["Recorrentes"],
|
|
3570
|
+
summary: "Pausar ou retomar despesa recorrente",
|
|
3571
|
+
operationId: "updateRecurringExpenseStatus",
|
|
3572
|
+
description: "S\xF3 `ativo` \u2194 `pausado`. Regra `finalizado` \xE9 terminal: n\xE3o volta a gerar documentos, e reativar seria ressuscitar um ciclo encerrado \u2014 crie uma regra nova.",
|
|
3573
|
+
security: [{ ApiKeyAuth: ["recurring:update"] }],
|
|
3574
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["status"], properties: {
|
|
3575
|
+
status: { type: "string", enum: ["ativo", "pausado"] }
|
|
3576
|
+
} } } } },
|
|
3577
|
+
responses: { "200": { description: "Regra atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/RecurringExpense" } } } }, "409": errorResponse("Regra finalizada"), "404": errorResponse("Regra n\xE3o encontrada"), ...COMMON_ERRORS }
|
|
3578
|
+
}
|
|
3579
|
+
},
|
|
3580
|
+
"/recurring-purchase-invoices/{id}/status": {
|
|
3581
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3582
|
+
patch: {
|
|
3583
|
+
tags: ["Recorrentes"],
|
|
3584
|
+
summary: "Pausar ou retomar conta a pagar recorrente",
|
|
3585
|
+
operationId: "updateRecurringPurchaseInvoiceStatus",
|
|
3586
|
+
description: "S\xF3 `ativo` \u2194 `pausado`; `finalizado` \xE9 terminal.",
|
|
3587
|
+
security: [{ ApiKeyAuth: ["recurring:update"] }],
|
|
3588
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["status"], properties: {
|
|
3589
|
+
status: { type: "string", enum: ["ativo", "pausado"] }
|
|
3590
|
+
} } } } },
|
|
3591
|
+
responses: { "200": { description: "Regra atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/RecurringPurchaseInvoice" } } } }, "409": errorResponse("Regra finalizada"), "404": errorResponse("Regra n\xE3o encontrada"), ...COMMON_ERRORS }
|
|
3592
|
+
}
|
|
3593
|
+
},
|
|
3594
|
+
"/notifications/{id}/read": {
|
|
3595
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3596
|
+
patch: {
|
|
3597
|
+
tags: ["Notifica\xE7\xF5es"],
|
|
3598
|
+
summary: "Marcar notifica\xE7\xE3o como lida",
|
|
3599
|
+
operationId: "updateNotificationRead",
|
|
3600
|
+
security: [{ ApiKeyAuth: ["notifications:update"] }],
|
|
3601
|
+
requestBody: { required: false, content: { "application/json": { schema: { type: "object", properties: {
|
|
3602
|
+
read: { type: "boolean", default: true, description: "`false` marca como N\xC3O lida." }
|
|
3603
|
+
} } } } },
|
|
3604
|
+
responses: { "200": { description: "Notifica\xE7\xE3o atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/Notification" } } } }, "404": errorResponse("Notifica\xE7\xE3o n\xE3o encontrada"), ...COMMON_ERRORS }
|
|
3605
|
+
}
|
|
3606
|
+
},
|
|
3486
3607
|
"/inbox/messages": {
|
|
3487
3608
|
get: {
|
|
3488
3609
|
tags: ["Caixa de Entrada"],
|
|
@@ -3713,6 +3834,14 @@ var OPENAPI_SPEC = {
|
|
|
3713
3834
|
{ name: "active", in: "query", description: "Somente ativos (true) ou inativos (false).", schema: { type: "string", enum: ["true", "false"] } }
|
|
3714
3835
|
],
|
|
3715
3836
|
responses: { "200": paginatedResponse("#/components/schemas/Insumo"), ...COMMON_ERRORS }
|
|
3837
|
+
},
|
|
3838
|
+
post: {
|
|
3839
|
+
tags: ["Insumos"],
|
|
3840
|
+
summary: "Criar insumo",
|
|
3841
|
+
operationId: "createInsumo",
|
|
3842
|
+
security: [{ ApiKeyAuth: ["insumos:write"] }],
|
|
3843
|
+
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/InsumoWrite" } } } },
|
|
3844
|
+
responses: { "201": { description: "Insumo criado", content: { "application/json": { schema: { $ref: "#/components/schemas/Insumo" } } } }, ...COMMON_ERRORS }
|
|
3716
3845
|
}
|
|
3717
3846
|
},
|
|
3718
3847
|
"/insumos/{id}": {
|
|
@@ -3723,6 +3852,21 @@ var OPENAPI_SPEC = {
|
|
|
3723
3852
|
operationId: "getInsumo",
|
|
3724
3853
|
security: [{ ApiKeyAuth: ["insumos:read"] }],
|
|
3725
3854
|
responses: { "200": { description: "Insumo", content: { "application/json": { schema: { $ref: "#/components/schemas/Insumo" } } } }, "404": errorResponse("Insumo n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3855
|
+
},
|
|
3856
|
+
patch: {
|
|
3857
|
+
tags: ["Insumos"],
|
|
3858
|
+
summary: "Editar insumo",
|
|
3859
|
+
operationId: "updateInsumo",
|
|
3860
|
+
security: [{ ApiKeyAuth: ["insumos:write"] }],
|
|
3861
|
+
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/InsumoWrite" } } } },
|
|
3862
|
+
responses: { "200": { description: "Insumo atualizado", content: { "application/json": { schema: { $ref: "#/components/schemas/Insumo" } } } }, "404": errorResponse("Insumo n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3863
|
+
},
|
|
3864
|
+
delete: {
|
|
3865
|
+
tags: ["Insumos"],
|
|
3866
|
+
summary: "Excluir insumo",
|
|
3867
|
+
operationId: "deleteInsumo",
|
|
3868
|
+
security: [{ ApiKeyAuth: ["insumos:delete"] }],
|
|
3869
|
+
responses: { "204": { description: "Exclu\xEDdo" }, "404": errorResponse("Insumo n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3726
3870
|
}
|
|
3727
3871
|
},
|
|
3728
3872
|
"/notifications": {
|
|
@@ -4174,14 +4318,16 @@ var API_MODULES = [
|
|
|
4174
4318
|
key: "inbox",
|
|
4175
4319
|
label: "Caixa de Entrada",
|
|
4176
4320
|
permissions: [
|
|
4177
|
-
{ key: "read", label: "Consultar mensagens e documentos", description: "Ver os e-mails recebidos e os boletos/notas extra\xEDdos deles" }
|
|
4321
|
+
{ key: "read", label: "Consultar mensagens e documentos", description: "Ver os e-mails recebidos e os boletos/notas extra\xEDdos deles" },
|
|
4322
|
+
{ key: "update", label: "Reprocessar e arquivar", description: "Devolver a mensagem ao processamento ou arquiv\xE1-la" }
|
|
4178
4323
|
]
|
|
4179
4324
|
},
|
|
4180
4325
|
{
|
|
4181
4326
|
key: "reconciliation",
|
|
4182
4327
|
label: "Concilia\xE7\xE3o Banc\xE1ria",
|
|
4183
4328
|
permissions: [
|
|
4184
|
-
{ key: "read", label: "Consultar extrato e per\xEDodos", description: "Ver lan\xE7amentos do extrato e os per\xEDodos de concilia\xE7\xE3o" }
|
|
4329
|
+
{ key: "read", label: "Consultar extrato e per\xEDodos", description: "Ver lan\xE7amentos do extrato e os per\xEDodos de concilia\xE7\xE3o" },
|
|
4330
|
+
{ key: "write", label: "Desfazer concilia\xE7\xE3o", description: "Desconciliar um lan\xE7amento j\xE1 casado (a concilia\xE7\xE3o em si \xE9 feita no aplicativo)" }
|
|
4185
4331
|
]
|
|
4186
4332
|
},
|
|
4187
4333
|
{
|
|
@@ -4195,28 +4341,33 @@ var API_MODULES = [
|
|
|
4195
4341
|
key: "dda",
|
|
4196
4342
|
label: "DDA",
|
|
4197
4343
|
permissions: [
|
|
4198
|
-
{ key: "read", label: "Consultar boletos", description: "Ver os boletos que o banco avisou por DDA e o status de casamento" }
|
|
4344
|
+
{ key: "read", label: "Consultar boletos", description: "Ver os boletos que o banco avisou por DDA e o status de casamento" },
|
|
4345
|
+
{ key: "triage", label: "Arquivar e reabrir", description: "Arquivar um boleto do DDA ou devolv\xEA-lo \xE0 fila" }
|
|
4199
4346
|
]
|
|
4200
4347
|
},
|
|
4201
4348
|
{
|
|
4202
4349
|
key: "recurring",
|
|
4203
4350
|
label: "Recorrentes",
|
|
4204
4351
|
permissions: [
|
|
4205
|
-
{ key: "read", label: "Consultar regras", description: "Ver as regras que geram despesas e contas a pagar recorrentes" }
|
|
4352
|
+
{ key: "read", label: "Consultar regras", description: "Ver as regras que geram despesas e contas a pagar recorrentes" },
|
|
4353
|
+
{ key: "update", label: "Pausar e retomar", description: "Pausar ou retomar uma regra recorrente" }
|
|
4206
4354
|
]
|
|
4207
4355
|
},
|
|
4208
4356
|
{
|
|
4209
4357
|
key: "insumos",
|
|
4210
4358
|
label: "Insumos",
|
|
4211
4359
|
permissions: [
|
|
4212
|
-
{ key: "read", label: "Listar e visualizar", description: "Consultar o cat\xE1logo de insumos" }
|
|
4360
|
+
{ key: "read", label: "Listar e visualizar", description: "Consultar o cat\xE1logo de insumos" },
|
|
4361
|
+
{ key: "write", label: "Criar e editar", description: "Criar e editar insumos" },
|
|
4362
|
+
{ key: "delete", label: "Excluir", description: "Excluir insumos" }
|
|
4213
4363
|
]
|
|
4214
4364
|
},
|
|
4215
4365
|
{
|
|
4216
4366
|
key: "notifications",
|
|
4217
4367
|
label: "Notifica\xE7\xF5es",
|
|
4218
4368
|
permissions: [
|
|
4219
|
-
{ key: "read", label: "Consultar notifica\xE7\xF5es", description: "Ver as notifica\xE7\xF5es geradas para os usu\xE1rios da empresa" }
|
|
4369
|
+
{ key: "read", label: "Consultar notifica\xE7\xF5es", description: "Ver as notifica\xE7\xF5es geradas para os usu\xE1rios da empresa" },
|
|
4370
|
+
{ key: "update", label: "Marcar como lida", description: "Marcar notifica\xE7\xE3o como lida ou n\xE3o lida" }
|
|
4220
4371
|
]
|
|
4221
4372
|
},
|
|
4222
4373
|
{
|
package/package.json
CHANGED