@comando.one/mcp-server 0.9.1 → 0.11.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 +171 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -278,6 +278,16 @@ var MANIFEST = [
|
|
|
278
278
|
{ operationId: "deleteFinancialMovement", tool: "finance_delete_movement", write: true, destructive: true },
|
|
279
279
|
// Módulos operacionais que tinham tela e nenhuma exposição (COBERTURA.md item 1).
|
|
280
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: "resolveStatementEntry", tool: "reconciliation_resolve", write: true },
|
|
283
|
+
{ operationId: "deleteReconciliationMatch", tool: "reconciliation_unmatch", write: true, destructive: true },
|
|
284
|
+
{ operationId: "triageDdaBoleto", tool: "dda_boletos_triage", write: true },
|
|
285
|
+
{ operationId: "updateRecurringExpenseStatus", tool: "recurring_expenses_set_status", write: true },
|
|
286
|
+
{ operationId: "updateRecurringPurchaseInvoiceStatus", tool: "recurring_purchase_invoices_set_status", write: true },
|
|
287
|
+
{ operationId: "updateNotificationRead", tool: "notifications_mark_read", write: true },
|
|
288
|
+
{ operationId: "createInsumo", tool: "insumos_create", write: true },
|
|
289
|
+
{ operationId: "updateInsumo", tool: "insumos_update", write: true },
|
|
290
|
+
{ operationId: "deleteInsumo", tool: "insumos_delete", write: true, destructive: true },
|
|
281
291
|
{ operationId: "listInboxMessages", tool: "inbox_messages_list" },
|
|
282
292
|
{ operationId: "getInboxMessage", tool: "inbox_messages_get" },
|
|
283
293
|
{ operationId: "listInboxDocuments", tool: "inbox_documents_list" },
|
|
@@ -1046,6 +1056,21 @@ var SCHEMAS = {
|
|
|
1046
1056
|
created_at: { type: "string", format: "date-time" }
|
|
1047
1057
|
}
|
|
1048
1058
|
},
|
|
1059
|
+
ReconciliationMatch: {
|
|
1060
|
+
type: "object",
|
|
1061
|
+
properties: {
|
|
1062
|
+
id: { type: "string", format: "uuid" },
|
|
1063
|
+
company_id: { type: "string", format: "uuid" },
|
|
1064
|
+
reconciliation_period_id: { type: "string", format: "uuid" },
|
|
1065
|
+
bank_statement_entry_id: { type: "string", format: "uuid" },
|
|
1066
|
+
ledger_origin: { type: "string" },
|
|
1067
|
+
ledger_origin_id: { type: "string", format: "uuid" },
|
|
1068
|
+
match_type: { type: "string" },
|
|
1069
|
+
created_ledger_origin: { type: "string" },
|
|
1070
|
+
created_ledger_origin_id: { type: "string", format: "uuid" },
|
|
1071
|
+
matched_at: { type: "string", format: "date-time" }
|
|
1072
|
+
}
|
|
1073
|
+
},
|
|
1049
1074
|
ReconciliationPeriod: {
|
|
1050
1075
|
type: "object",
|
|
1051
1076
|
properties: {
|
|
@@ -1153,6 +1178,17 @@ var SCHEMAS = {
|
|
|
1153
1178
|
updated_at: { type: "string", format: "date-time" }
|
|
1154
1179
|
}
|
|
1155
1180
|
},
|
|
1181
|
+
InsumoWrite: {
|
|
1182
|
+
type: "object",
|
|
1183
|
+
required: ["name"],
|
|
1184
|
+
properties: {
|
|
1185
|
+
name: { type: "string" },
|
|
1186
|
+
description: { type: "string" },
|
|
1187
|
+
unit: { type: "string", default: "un" },
|
|
1188
|
+
unit_price: { type: "number" },
|
|
1189
|
+
active: { type: "boolean", default: true }
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1156
1192
|
Insumo: {
|
|
1157
1193
|
type: "object",
|
|
1158
1194
|
properties: {
|
|
@@ -3503,6 +3539,105 @@ var OPENAPI_SPEC = {
|
|
|
3503
3539
|
// -----------------------------------------------------------------------
|
|
3504
3540
|
// Contas bancárias (read-only)
|
|
3505
3541
|
// -----------------------------------------------------------------------
|
|
3542
|
+
"/inbox/messages/{id}/status": {
|
|
3543
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3544
|
+
patch: {
|
|
3545
|
+
tags: ["Caixa de Entrada"],
|
|
3546
|
+
summary: "Reprocessar ou arquivar mensagem",
|
|
3547
|
+
operationId: "updateInboxMessageStatus",
|
|
3548
|
+
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.",
|
|
3549
|
+
security: [{ ApiKeyAuth: ["inbox:update"] }],
|
|
3550
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["status"], properties: {
|
|
3551
|
+
status: { type: "string", enum: ["recebido", "ignorado"] }
|
|
3552
|
+
} } } } },
|
|
3553
|
+
responses: { "200": { description: "Mensagem atualizada", content: { "application/json": { schema: { $ref: "#/components/schemas/InboxMessage" } } } }, "404": errorResponse("Mensagem n\xE3o encontrada"), ...COMMON_ERRORS }
|
|
3554
|
+
}
|
|
3555
|
+
},
|
|
3556
|
+
"/reconciliation/entries/{id}/resolve": {
|
|
3557
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3558
|
+
post: {
|
|
3559
|
+
tags: ["Concilia\xE7\xE3o"],
|
|
3560
|
+
summary: "Conciliar um lan\xE7amento do extrato",
|
|
3561
|
+
operationId: "resolveStatementEntry",
|
|
3562
|
+
description: "Concilia pela mesma rotina que a tela usa. As recusas v\xEAm de l\xE1 e s\xE3o espec\xEDficas: per\xEDodo fechado, lan\xE7amento ignorado, lan\xE7amento j\xE1 conciliado, e a dire\xE7\xE3o do dinheiro por a\xE7\xE3o (recebimento s\xF3 resolve entrada; despesa e pagamento a fornecedor, s\xF3 sa\xEDda). Omitindo `period_id`, usa o per\xEDodo do lan\xE7amento ou o per\xEDodo ABERTO da conta. Criar REGRA de automa\xE7\xE3o junto n\xE3o \xE9 exposto: \xE9 outra decis\xE3o e fica no aplicativo.",
|
|
3563
|
+
security: [{ ApiKeyAuth: ["reconciliation:write"] }],
|
|
3564
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["action"], properties: {
|
|
3565
|
+
action: { type: "string", enum: ["match_existing", "create_payment_from_customer_charge", "create_supplier_payment_from_purchase_charge", "create_expense", "create_financial_movement"] },
|
|
3566
|
+
period_id: { type: "string", format: "uuid", description: "Opcional: o per\xEDodo. Omitido, resolve sozinho." },
|
|
3567
|
+
target_kind: { type: "string", enum: ["existing_payment", "existing_supplier_payment", "existing_expense", "existing_split_payout"], description: "S\xF3 em `match_existing`. O destino precisa existir nesta empresa." },
|
|
3568
|
+
target_id: { type: "string", format: "uuid", description: "S\xF3 em `match_existing`." },
|
|
3569
|
+
payload: { type: "object", description: "Campos da a\xE7\xE3o (ex.: `supplier_id` e `category_id` em `create_expense`; `charge_id` nas que partem de uma parcela).", additionalProperties: true }
|
|
3570
|
+
} } } } },
|
|
3571
|
+
responses: { "201": { description: "Conciliado", content: { "application/json": { schema: { $ref: "#/components/schemas/ReconciliationMatch" } } } }, "409": errorResponse("N\xE3o foi poss\xEDvel conciliar (j\xE1 conciliado, per\xEDodo fechado, dire\xE7\xE3o incompat\xEDvel)"), "404": errorResponse("Lan\xE7amento, per\xEDodo ou destino n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3572
|
+
}
|
|
3573
|
+
},
|
|
3574
|
+
"/reconciliation/matches/{id}": {
|
|
3575
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3576
|
+
delete: {
|
|
3577
|
+
tags: ["Concilia\xE7\xE3o"],
|
|
3578
|
+
summary: "Desfazer uma concilia\xE7\xE3o",
|
|
3579
|
+
operationId: "deleteReconciliationMatch",
|
|
3580
|
+
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.",
|
|
3581
|
+
security: [{ ApiKeyAuth: ["reconciliation:write"] }],
|
|
3582
|
+
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 }
|
|
3583
|
+
}
|
|
3584
|
+
},
|
|
3585
|
+
"/dda-boletos/{id}/triage": {
|
|
3586
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3587
|
+
post: {
|
|
3588
|
+
tags: ["DDA"],
|
|
3589
|
+
summary: "Arquivar ou reabrir boleto do DDA",
|
|
3590
|
+
operationId: "triageDdaBoleto",
|
|
3591
|
+
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.",
|
|
3592
|
+
security: [{ ApiKeyAuth: ["dda:triage"] }],
|
|
3593
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["action"], properties: {
|
|
3594
|
+
action: { type: "string", enum: ["ignore", "reopen"] },
|
|
3595
|
+
note: { type: "string", description: "Observa\xE7\xE3o da triagem (s\xF3 em `ignore`)." }
|
|
3596
|
+
} } } } },
|
|
3597
|
+
responses: { "200": { description: "Boleto triado", content: { "application/json": { schema: { $ref: "#/components/schemas/DdaBoleto" } } } }, "404": errorResponse("Boleto n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3598
|
+
}
|
|
3599
|
+
},
|
|
3600
|
+
"/recurring-expenses/{id}/status": {
|
|
3601
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3602
|
+
patch: {
|
|
3603
|
+
tags: ["Recorrentes"],
|
|
3604
|
+
summary: "Pausar ou retomar despesa recorrente",
|
|
3605
|
+
operationId: "updateRecurringExpenseStatus",
|
|
3606
|
+
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.",
|
|
3607
|
+
security: [{ ApiKeyAuth: ["recurring:update"] }],
|
|
3608
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["status"], properties: {
|
|
3609
|
+
status: { type: "string", enum: ["ativo", "pausado"] }
|
|
3610
|
+
} } } } },
|
|
3611
|
+
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 }
|
|
3612
|
+
}
|
|
3613
|
+
},
|
|
3614
|
+
"/recurring-purchase-invoices/{id}/status": {
|
|
3615
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3616
|
+
patch: {
|
|
3617
|
+
tags: ["Recorrentes"],
|
|
3618
|
+
summary: "Pausar ou retomar conta a pagar recorrente",
|
|
3619
|
+
operationId: "updateRecurringPurchaseInvoiceStatus",
|
|
3620
|
+
description: "S\xF3 `ativo` \u2194 `pausado`; `finalizado` \xE9 terminal.",
|
|
3621
|
+
security: [{ ApiKeyAuth: ["recurring:update"] }],
|
|
3622
|
+
requestBody: { required: true, content: { "application/json": { schema: { type: "object", required: ["status"], properties: {
|
|
3623
|
+
status: { type: "string", enum: ["ativo", "pausado"] }
|
|
3624
|
+
} } } } },
|
|
3625
|
+
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 }
|
|
3626
|
+
}
|
|
3627
|
+
},
|
|
3628
|
+
"/notifications/{id}/read": {
|
|
3629
|
+
parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
|
|
3630
|
+
patch: {
|
|
3631
|
+
tags: ["Notifica\xE7\xF5es"],
|
|
3632
|
+
summary: "Marcar notifica\xE7\xE3o como lida",
|
|
3633
|
+
operationId: "updateNotificationRead",
|
|
3634
|
+
security: [{ ApiKeyAuth: ["notifications:update"] }],
|
|
3635
|
+
requestBody: { required: false, content: { "application/json": { schema: { type: "object", properties: {
|
|
3636
|
+
read: { type: "boolean", default: true, description: "`false` marca como N\xC3O lida." }
|
|
3637
|
+
} } } } },
|
|
3638
|
+
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 }
|
|
3639
|
+
}
|
|
3640
|
+
},
|
|
3506
3641
|
"/inbox/messages": {
|
|
3507
3642
|
get: {
|
|
3508
3643
|
tags: ["Caixa de Entrada"],
|
|
@@ -3733,6 +3868,14 @@ var OPENAPI_SPEC = {
|
|
|
3733
3868
|
{ name: "active", in: "query", description: "Somente ativos (true) ou inativos (false).", schema: { type: "string", enum: ["true", "false"] } }
|
|
3734
3869
|
],
|
|
3735
3870
|
responses: { "200": paginatedResponse("#/components/schemas/Insumo"), ...COMMON_ERRORS }
|
|
3871
|
+
},
|
|
3872
|
+
post: {
|
|
3873
|
+
tags: ["Insumos"],
|
|
3874
|
+
summary: "Criar insumo",
|
|
3875
|
+
operationId: "createInsumo",
|
|
3876
|
+
security: [{ ApiKeyAuth: ["insumos:write"] }],
|
|
3877
|
+
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/InsumoWrite" } } } },
|
|
3878
|
+
responses: { "201": { description: "Insumo criado", content: { "application/json": { schema: { $ref: "#/components/schemas/Insumo" } } } }, ...COMMON_ERRORS }
|
|
3736
3879
|
}
|
|
3737
3880
|
},
|
|
3738
3881
|
"/insumos/{id}": {
|
|
@@ -3743,6 +3886,21 @@ var OPENAPI_SPEC = {
|
|
|
3743
3886
|
operationId: "getInsumo",
|
|
3744
3887
|
security: [{ ApiKeyAuth: ["insumos:read"] }],
|
|
3745
3888
|
responses: { "200": { description: "Insumo", content: { "application/json": { schema: { $ref: "#/components/schemas/Insumo" } } } }, "404": errorResponse("Insumo n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3889
|
+
},
|
|
3890
|
+
patch: {
|
|
3891
|
+
tags: ["Insumos"],
|
|
3892
|
+
summary: "Editar insumo",
|
|
3893
|
+
operationId: "updateInsumo",
|
|
3894
|
+
security: [{ ApiKeyAuth: ["insumos:write"] }],
|
|
3895
|
+
requestBody: { required: true, content: { "application/json": { schema: { $ref: "#/components/schemas/InsumoWrite" } } } },
|
|
3896
|
+
responses: { "200": { description: "Insumo atualizado", content: { "application/json": { schema: { $ref: "#/components/schemas/Insumo" } } } }, "404": errorResponse("Insumo n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3897
|
+
},
|
|
3898
|
+
delete: {
|
|
3899
|
+
tags: ["Insumos"],
|
|
3900
|
+
summary: "Excluir insumo",
|
|
3901
|
+
operationId: "deleteInsumo",
|
|
3902
|
+
security: [{ ApiKeyAuth: ["insumos:delete"] }],
|
|
3903
|
+
responses: { "204": { description: "Exclu\xEDdo" }, "404": errorResponse("Insumo n\xE3o encontrado"), ...COMMON_ERRORS }
|
|
3746
3904
|
}
|
|
3747
3905
|
},
|
|
3748
3906
|
"/notifications": {
|
|
@@ -4194,14 +4352,16 @@ var API_MODULES = [
|
|
|
4194
4352
|
key: "inbox",
|
|
4195
4353
|
label: "Caixa de Entrada",
|
|
4196
4354
|
permissions: [
|
|
4197
|
-
{ key: "read", label: "Consultar mensagens e documentos", description: "Ver os e-mails recebidos e os boletos/notas extra\xEDdos deles" }
|
|
4355
|
+
{ key: "read", label: "Consultar mensagens e documentos", description: "Ver os e-mails recebidos e os boletos/notas extra\xEDdos deles" },
|
|
4356
|
+
{ key: "update", label: "Reprocessar e arquivar", description: "Devolver a mensagem ao processamento ou arquiv\xE1-la" }
|
|
4198
4357
|
]
|
|
4199
4358
|
},
|
|
4200
4359
|
{
|
|
4201
4360
|
key: "reconciliation",
|
|
4202
4361
|
label: "Concilia\xE7\xE3o Banc\xE1ria",
|
|
4203
4362
|
permissions: [
|
|
4204
|
-
{ key: "read", label: "Consultar extrato e per\xEDodos", description: "Ver lan\xE7amentos do extrato e os per\xEDodos de concilia\xE7\xE3o" }
|
|
4363
|
+
{ key: "read", label: "Consultar extrato e per\xEDodos", description: "Ver lan\xE7amentos do extrato e os per\xEDodos de concilia\xE7\xE3o" },
|
|
4364
|
+
{ 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)" }
|
|
4205
4365
|
]
|
|
4206
4366
|
},
|
|
4207
4367
|
{
|
|
@@ -4215,28 +4375,33 @@ var API_MODULES = [
|
|
|
4215
4375
|
key: "dda",
|
|
4216
4376
|
label: "DDA",
|
|
4217
4377
|
permissions: [
|
|
4218
|
-
{ key: "read", label: "Consultar boletos", description: "Ver os boletos que o banco avisou por DDA e o status de casamento" }
|
|
4378
|
+
{ key: "read", label: "Consultar boletos", description: "Ver os boletos que o banco avisou por DDA e o status de casamento" },
|
|
4379
|
+
{ key: "triage", label: "Arquivar e reabrir", description: "Arquivar um boleto do DDA ou devolv\xEA-lo \xE0 fila" }
|
|
4219
4380
|
]
|
|
4220
4381
|
},
|
|
4221
4382
|
{
|
|
4222
4383
|
key: "recurring",
|
|
4223
4384
|
label: "Recorrentes",
|
|
4224
4385
|
permissions: [
|
|
4225
|
-
{ key: "read", label: "Consultar regras", description: "Ver as regras que geram despesas e contas a pagar recorrentes" }
|
|
4386
|
+
{ key: "read", label: "Consultar regras", description: "Ver as regras que geram despesas e contas a pagar recorrentes" },
|
|
4387
|
+
{ key: "update", label: "Pausar e retomar", description: "Pausar ou retomar uma regra recorrente" }
|
|
4226
4388
|
]
|
|
4227
4389
|
},
|
|
4228
4390
|
{
|
|
4229
4391
|
key: "insumos",
|
|
4230
4392
|
label: "Insumos",
|
|
4231
4393
|
permissions: [
|
|
4232
|
-
{ key: "read", label: "Listar e visualizar", description: "Consultar o cat\xE1logo de insumos" }
|
|
4394
|
+
{ key: "read", label: "Listar e visualizar", description: "Consultar o cat\xE1logo de insumos" },
|
|
4395
|
+
{ key: "write", label: "Criar e editar", description: "Criar e editar insumos" },
|
|
4396
|
+
{ key: "delete", label: "Excluir", description: "Excluir insumos" }
|
|
4233
4397
|
]
|
|
4234
4398
|
},
|
|
4235
4399
|
{
|
|
4236
4400
|
key: "notifications",
|
|
4237
4401
|
label: "Notifica\xE7\xF5es",
|
|
4238
4402
|
permissions: [
|
|
4239
|
-
{ key: "read", label: "Consultar notifica\xE7\xF5es", description: "Ver as notifica\xE7\xF5es geradas para os usu\xE1rios da empresa" }
|
|
4403
|
+
{ key: "read", label: "Consultar notifica\xE7\xF5es", description: "Ver as notifica\xE7\xF5es geradas para os usu\xE1rios da empresa" },
|
|
4404
|
+
{ key: "update", label: "Marcar como lida", description: "Marcar notifica\xE7\xE3o como lida ou n\xE3o lida" }
|
|
4240
4405
|
]
|
|
4241
4406
|
},
|
|
4242
4407
|
{
|
package/package.json
CHANGED