@comando.one/mcp-server 0.8.0 → 0.9.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 +571 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -275,6 +275,28 @@ var MANIFEST = [
275
275
  // Financeiro e contas bancárias
276
276
  { operationId: "listFinancialNatures", tool: "finance_list_natures" },
277
277
  { operationId: "deleteFinancialMovement", tool: "finance_delete_movement", write: true, destructive: true },
278
+ // Módulos operacionais que tinham tela e nenhuma exposição (COBERTURA.md item 1).
279
+ // Somente leitura — escrever em conciliação/cartão/DDA mexe em dinheiro e entra depois.
280
+ { operationId: "listInboxMessages", tool: "inbox_messages_list" },
281
+ { operationId: "getInboxMessage", tool: "inbox_messages_get" },
282
+ { operationId: "listInboxDocuments", tool: "inbox_documents_list" },
283
+ { operationId: "getInboxDocument", tool: "inbox_documents_get" },
284
+ { operationId: "listStatementEntries", tool: "reconciliation_entries_list" },
285
+ { operationId: "getStatementEntry", tool: "reconciliation_entries_get" },
286
+ { operationId: "listReconciliationPeriods", tool: "reconciliation_periods_list" },
287
+ { operationId: "getReconciliationPeriod", tool: "reconciliation_periods_get" },
288
+ { operationId: "listCardStatements", tool: "card_statements_list" },
289
+ { operationId: "getCardStatement", tool: "card_statements_get" },
290
+ { operationId: "listDdaBoletos", tool: "dda_boletos_list" },
291
+ { operationId: "getDdaBoleto", tool: "dda_boletos_get" },
292
+ { operationId: "listRecurringExpenses", tool: "recurring_expenses_list" },
293
+ { operationId: "getRecurringExpense", tool: "recurring_expenses_get" },
294
+ { operationId: "listRecurringPurchaseInvoices", tool: "recurring_purchase_invoices_list" },
295
+ { operationId: "getRecurringPurchaseInvoice", tool: "recurring_purchase_invoices_get" },
296
+ { operationId: "listInsumos", tool: "insumos_list" },
297
+ { operationId: "getInsumo", tool: "insumos_get" },
298
+ { operationId: "listNotifications", tool: "notifications_list" },
299
+ { operationId: "getNotification", tool: "notifications_get" },
278
300
  { operationId: "listBankAccounts", tool: "bank_accounts_list" },
279
301
  { operationId: "getBankAccount", tool: "bank_accounts_get" },
280
302
  // Dados de referência de pagamento
@@ -286,6 +308,7 @@ var MANIFEST = [
286
308
  // Webhooks — edição, teste e entregas
287
309
  { operationId: "updateWebhook", tool: "webhooks_update", write: true },
288
310
  { operationId: "deleteWebhook", tool: "webhooks_delete", write: true, destructive: true },
311
+ { operationId: "deletePaymentsWebhookConfig", tool: "webhooks_delete_config", write: true, destructive: true },
289
312
  { operationId: "getWebhook", tool: "webhooks_get_config" },
290
313
  { operationId: "upsertWebhook", tool: "webhooks_upsert_config", write: true },
291
314
  { operationId: "testWebhook", tool: "webhooks_test", write: true },
@@ -521,6 +544,7 @@ var SCHEMAS = {
521
544
  due_days: { type: "integer", default: 10 },
522
545
  amount: { type: "number" },
523
546
  payment_method_id: { type: "string", format: "uuid" },
547
+ next_generation_date: { type: "string", format: "date", description: "Data da pr\xF3xima gera\xE7\xE3o de fatura. Omitido, usa 'start_date'." },
524
548
  notes: { type: "string" }
525
549
  }
526
550
  },
@@ -872,8 +896,13 @@ var SCHEMAS = {
872
896
  }
873
897
  },
874
898
  title: { type: "string", description: "Descri\xE7\xE3o da fatura; vira o nome do item quando 'items' n\xE3o \xE9 informado." },
899
+ description: { type: "string", description: "Apelido de 'title' na hora de nomear o item \xFAnico. Preced\xEAncia: title > description > notes > invoice_number." },
875
900
  digitable_line: { type: "string", description: "Atalho: grava o boleto na parcela \xFAnica criada por 'due_date'." },
901
+ boleto_barcode: { type: "string", description: "Apelido de 'digitable_line' no n\xEDvel raiz. Vale para as parcelas que n\xE3o trouxerem o seu pr\xF3prio." },
902
+ barcode: { type: "string", description: "Apelido de 'digitable_line'. Preced\xEAncia: o da parcela > boleto_barcode > digitable_line > barcode." },
876
903
  pix_key: { type: "string", description: "Atalho: grava a chave Pix na parcela \xFAnica." },
904
+ pix_copia_e_cola: { type: "string", description: "Pix copia-e-cola no n\xEDvel raiz. Vale para as parcelas que n\xE3o trouxerem o seu pr\xF3prio." },
905
+ pix_payload: { type: "string", description: "Apelido de 'pix_copia_e_cola'. Preced\xEAncia: o da parcela > pix_copia_e_cola > pix_payload." },
877
906
  notes: { type: "string" },
878
907
  attachment_ids: {
879
908
  type: "array",
@@ -937,6 +966,219 @@ var SCHEMAS = {
937
966
  active: { type: "boolean", default: true }
938
967
  }
939
968
  },
969
+ InboxMessage: {
970
+ type: "object",
971
+ properties: {
972
+ id: { type: "string", format: "uuid" },
973
+ from_email: { type: "string" },
974
+ from_name: { type: "string" },
975
+ subject: { type: "string" },
976
+ status: { type: "string" },
977
+ error_reason: { type: "string" },
978
+ attempts: { type: "number" },
979
+ received_at: { type: "string", format: "date-time" },
980
+ processed_at: { type: "string", format: "date-time" },
981
+ replied_at: { type: "string", format: "date-time" },
982
+ created_at: { type: "string", format: "date-time" },
983
+ body_text: { type: "string" },
984
+ spf_verdict: { type: "string" },
985
+ dkim_verdict: { type: "string" },
986
+ dmarc_verdict: { type: "string" },
987
+ spam_verdict: { type: "string" },
988
+ virus_verdict: { type: "string" },
989
+ raw_size_bytes: { type: "number" },
990
+ thread_root_id: { type: "string", format: "uuid" }
991
+ }
992
+ },
993
+ InboxDocument: {
994
+ type: "object",
995
+ properties: {
996
+ id: { type: "string", format: "uuid" },
997
+ message_id: { type: "string", format: "uuid" },
998
+ filename: { type: "string" },
999
+ content_type: { type: "string" },
1000
+ size_bytes: { type: "number" },
1001
+ kind: { type: "string" },
1002
+ direction: { type: "string" },
1003
+ amount: { type: "number" },
1004
+ due_date: { type: "string", format: "date" },
1005
+ issue_date: { type: "string", format: "date" },
1006
+ document_number: { type: "string" },
1007
+ counterparty_name: { type: "string" },
1008
+ counterparty_document: { type: "string" },
1009
+ barcode: { type: "string" },
1010
+ pix_key: { type: "string" },
1011
+ outcome: { type: "string" },
1012
+ outcome_reason: { type: "string" },
1013
+ match_method: { type: "string" },
1014
+ match_confidence: { type: "number" },
1015
+ supplier_id: { type: "string", format: "uuid" },
1016
+ customer_id: { type: "string", format: "uuid" },
1017
+ purchase_invoice_id: { type: "string", format: "uuid" },
1018
+ invoice_id: { type: "string", format: "uuid" },
1019
+ duplicate_of_document_id: { type: "string", format: "uuid" },
1020
+ dda_boleto_id: { type: "string", format: "uuid" },
1021
+ card_statement_id: { type: "string", format: "uuid" },
1022
+ created_at: { type: "string", format: "date-time" },
1023
+ updated_at: { type: "string", format: "date-time" }
1024
+ }
1025
+ },
1026
+ StatementEntry: {
1027
+ type: "object",
1028
+ properties: {
1029
+ id: { type: "string", format: "uuid" },
1030
+ bank_account_id: { type: "string", format: "uuid" },
1031
+ entry_date: { type: "string", format: "date" },
1032
+ amount: { type: "number" },
1033
+ entry_type: { type: "string" },
1034
+ operation_type: { type: "string" },
1035
+ transaction_type: { type: "string" },
1036
+ description: { type: "string" },
1037
+ balance: { type: "number" },
1038
+ external_id: { type: "string", format: "uuid" },
1039
+ is_ignored: { type: "boolean" },
1040
+ reconciliation_period_id: { type: "string", format: "uuid" },
1041
+ card_statement_id: { type: "string", format: "uuid" },
1042
+ end_to_end_id: { type: "string", format: "uuid" },
1043
+ counterparty_name: { type: "string" },
1044
+ counterparty_document: { type: "string" },
1045
+ created_at: { type: "string", format: "date-time" }
1046
+ }
1047
+ },
1048
+ ReconciliationPeriod: {
1049
+ type: "object",
1050
+ properties: {
1051
+ id: { type: "string", format: "uuid" },
1052
+ bank_account_id: { type: "string", format: "uuid" },
1053
+ start_date: { type: "string", format: "date" },
1054
+ end_date: { type: "string", format: "date" },
1055
+ status: { type: "string" },
1056
+ opening_balance: { type: "number" },
1057
+ closing_balance: { type: "number" },
1058
+ notes: { type: "string" },
1059
+ closed_at: { type: "string", format: "date-time" },
1060
+ created_at: { type: "string", format: "date-time" },
1061
+ updated_at: { type: "string", format: "date-time" }
1062
+ }
1063
+ },
1064
+ CardStatement: {
1065
+ type: "object",
1066
+ properties: {
1067
+ id: { type: "string", format: "uuid" },
1068
+ bank_account_id: { type: "string", format: "uuid" },
1069
+ reference_month: { type: "string", format: "date" },
1070
+ closing_date: { type: "string", format: "date" },
1071
+ due_date: { type: "string", format: "date" },
1072
+ status: { type: "string" },
1073
+ total_expenses: { type: "number" },
1074
+ total_entries: { type: "number" },
1075
+ paid_amount: { type: "number" },
1076
+ paid_at: { type: "string", format: "date-time" },
1077
+ paid_bank_account_id: { type: "string", format: "uuid" },
1078
+ boleto_barcode: { type: "string" },
1079
+ boleto_amount: { type: "number" },
1080
+ boleto_due_date: { type: "string", format: "date" },
1081
+ purchase_invoice_id: { type: "string", format: "uuid" },
1082
+ reconciliation_period_id: { type: "string", format: "uuid" },
1083
+ notes: { type: "string" },
1084
+ created_at: { type: "string", format: "date-time" },
1085
+ updated_at: { type: "string", format: "date-time" }
1086
+ }
1087
+ },
1088
+ DdaBoleto: {
1089
+ type: "object",
1090
+ properties: {
1091
+ id: { type: "string", format: "uuid" },
1092
+ supplier_id: { type: "string", format: "uuid" },
1093
+ purchase_invoice_id: { type: "string", format: "uuid" },
1094
+ barcode: { type: "string" },
1095
+ beneficiary_name: { type: "string" },
1096
+ beneficiary_document: { type: "string" },
1097
+ payer_name: { type: "string" },
1098
+ payer_document: { type: "string" },
1099
+ bank_code: { type: "string" },
1100
+ bank_name: { type: "string" },
1101
+ amount: { type: "number" },
1102
+ due_date: { type: "string", format: "date" },
1103
+ overdue: { type: "boolean" },
1104
+ match_status: { type: "string" },
1105
+ match_method: { type: "string" },
1106
+ match_confidence: { type: "number" },
1107
+ error_message: { type: "string" },
1108
+ triaged_at: { type: "string", format: "date-time" },
1109
+ triage_note: { type: "string" },
1110
+ card_statement_id: { type: "string", format: "uuid" },
1111
+ first_seen_at: { type: "string", format: "date-time" },
1112
+ last_seen_at: { type: "string", format: "date-time" },
1113
+ created_at: { type: "string", format: "date-time" }
1114
+ }
1115
+ },
1116
+ RecurringExpense: {
1117
+ type: "object",
1118
+ properties: {
1119
+ id: { type: "string", format: "uuid" },
1120
+ supplier_id: { type: "string", format: "uuid" },
1121
+ description: { type: "string" },
1122
+ amount: { type: "number" },
1123
+ category_id: { type: "string", format: "uuid" },
1124
+ bank_account_id: { type: "string", format: "uuid" },
1125
+ payment_method_id: { type: "string", format: "uuid" },
1126
+ frequency: { type: "string" },
1127
+ start_date: { type: "string", format: "date" },
1128
+ end_date: { type: "string", format: "date" },
1129
+ next_generation_date: { type: "string", format: "date" },
1130
+ status: { type: "string" },
1131
+ notes: { type: "string" },
1132
+ created_at: { type: "string", format: "date-time" },
1133
+ updated_at: { type: "string", format: "date-time" }
1134
+ }
1135
+ },
1136
+ RecurringPurchaseInvoice: {
1137
+ type: "object",
1138
+ properties: {
1139
+ id: { type: "string", format: "uuid" },
1140
+ supplier_id: { type: "string", format: "uuid" },
1141
+ payment_condition_id: { type: "string", format: "uuid" },
1142
+ payment_method_id: { type: "string", format: "uuid" },
1143
+ supplier_payment_method_id: { type: "string", format: "uuid" },
1144
+ frequency: { type: "string" },
1145
+ start_date: { type: "string", format: "date" },
1146
+ end_date: { type: "string", format: "date" },
1147
+ next_generation_date: { type: "string", format: "date" },
1148
+ status: { type: "string" },
1149
+ notes: { type: "string" },
1150
+ adjust_due_to_business_day: { type: "boolean" },
1151
+ created_at: { type: "string", format: "date-time" },
1152
+ updated_at: { type: "string", format: "date-time" }
1153
+ }
1154
+ },
1155
+ Insumo: {
1156
+ type: "object",
1157
+ properties: {
1158
+ id: { type: "string", format: "uuid" },
1159
+ name: { type: "string" },
1160
+ description: { type: "string" },
1161
+ unit: { type: "string" },
1162
+ unit_price: { type: "number" },
1163
+ active: { type: "boolean" },
1164
+ created_at: { type: "string", format: "date-time" },
1165
+ updated_at: { type: "string", format: "date-time" }
1166
+ }
1167
+ },
1168
+ Notification: {
1169
+ type: "object",
1170
+ properties: {
1171
+ id: { type: "string", format: "uuid" },
1172
+ user_id: { type: "string", format: "uuid" },
1173
+ type: { type: "string" },
1174
+ title: { type: "string" },
1175
+ body: { type: "string" },
1176
+ entity_type: { type: "string" },
1177
+ entity_id: { type: "string", format: "uuid" },
1178
+ read_at: { type: "string", format: "date-time" },
1179
+ created_at: { type: "string", format: "date-time" }
1180
+ }
1181
+ },
940
1182
  BankAccount: {
941
1183
  type: "object",
942
1184
  description: "Conta banc\xE1ria (campos sens\xEDveis como ag\xEAncia, conta, chave Pix e documento do titular s\xE3o omitidos da API p\xFAblica).",
@@ -2137,6 +2379,7 @@ var OPENAPI_SPEC = {
2137
2379
  amount: { type: "number", description: "Valor recebido. Omitido, quita o saldo restante da parcela." },
2138
2380
  payment_date: { type: "string", format: "date", description: "Data do recebimento (YYYY-MM-DD). Padr\xE3o: hoje." },
2139
2381
  receipt_method_id: { type: "string", format: "uuid", description: "Forma de RECEBIMENTO (GET /v1/payment-methods). Aceita tamb\xE9m o nome `payment_method_id`." },
2382
+ payment_method_id: { type: "string", format: "uuid", description: "Apelido de 'receipt_method_id'. Este s\xF3 tem efeito quando o can\xF4nico n\xE3o vem." },
2140
2383
  bank_account_id: { type: "string", format: "uuid", description: "Conta que recebeu (GET /v1/bank-accounts)." },
2141
2384
  notes: { type: "string", description: "Observa\xE7\xE3o livre do pagamento." }
2142
2385
  } } } } },
@@ -2248,6 +2491,10 @@ var OPENAPI_SPEC = {
2248
2491
  description: "Destinat\xE1rio(s). Aceita string separada por v\xEDrgula ou lista. Omitido, usa o e-mail do cliente.",
2249
2492
  oneOf: [{ type: "string" }, { type: "array", items: { type: "string", format: "email" } }]
2250
2493
  },
2494
+ recipient_emails: {
2495
+ description: "Apelido de 'to'. Mesmo formato; 'to' tem preced\xEAncia.",
2496
+ oneOf: [{ type: "string" }, { type: "array", items: { type: "string", format: "email" } }]
2497
+ },
2251
2498
  subject: { type: "string", description: "Assunto. Padr\xE3o: 'Segunda via da fatura <numero>'." },
2252
2499
  body_html: { type: "string", description: "Corpo em HTML. Padr\xE3o: mensagem curta com valor e vencimento." },
2253
2500
  include_attachments: { type: "boolean", default: true, description: "Anexa os arquivos da fatura." }
@@ -3202,9 +3449,12 @@ var OPENAPI_SPEC = {
3202
3449
  }
3203
3450
  },
3204
3451
  delete: {
3452
+ // `operationId` próprio: esta rota dividia `deleteWebhook` com DELETE /webhooks/{id},
3453
+ // e id repetido faz a derivação de tool casar com UMA das duas — a outra fica
3454
+ // inalcançável pelo MCP, em silêncio. Um id por operação.
3205
3455
  tags: ["Webhooks"],
3206
- summary: "Remover webhook",
3207
- operationId: "deleteWebhook",
3456
+ summary: "Remover a configura\xE7\xE3o de webhook de pagamentos",
3457
+ operationId: "deletePaymentsWebhookConfig",
3208
3458
  security: [{ ApiKeyAuth: ["webhooks:manage"] }],
3209
3459
  responses: { "200": { description: "Removido" }, "404": errorResponse("Nenhum webhook configurado"), ...COMMON_ERRORS }
3210
3460
  }
@@ -3233,6 +3483,276 @@ var OPENAPI_SPEC = {
3233
3483
  // -----------------------------------------------------------------------
3234
3484
  // Contas bancárias (read-only)
3235
3485
  // -----------------------------------------------------------------------
3486
+ "/inbox/messages": {
3487
+ get: {
3488
+ tags: ["Caixa de Entrada"],
3489
+ summary: "Listar mensagens da caixa de entrada",
3490
+ operationId: "listInboxMessages",
3491
+ security: [{ ApiKeyAuth: ["inbox:read"] }],
3492
+ parameters: [
3493
+ ...PAGINATION_PARAMS,
3494
+ { name: "status", in: "query", description: "Estado do processamento da mensagem.", schema: { type: "string" } },
3495
+ { name: "from_email", in: "query", description: "Remetente (busca parcial).", schema: { type: "string" } },
3496
+ { name: "subject", in: "query", description: "Assunto (busca parcial).", schema: { type: "string" } },
3497
+ { name: "received_from", in: "query", description: "Recebidas a partir desta data.", schema: { type: "string", format: "date" } },
3498
+ { name: "received_to", in: "query", description: "Recebidas at\xE9 esta data.", schema: { type: "string", format: "date" } }
3499
+ ],
3500
+ responses: { "200": paginatedResponse("#/components/schemas/InboxMessage"), ...COMMON_ERRORS }
3501
+ }
3502
+ },
3503
+ "/inbox/messages/{id}": {
3504
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3505
+ get: {
3506
+ tags: ["Caixa de Entrada"],
3507
+ summary: "Obter mensagem da caixa de entrada",
3508
+ operationId: "getInboxMessage",
3509
+ security: [{ ApiKeyAuth: ["inbox:read"] }],
3510
+ responses: { "200": { description: "Mensagem da caixa de entrada", content: { "application/json": { schema: { $ref: "#/components/schemas/InboxMessage" } } } }, "404": errorResponse("Mensagem da caixa de entrada n\xE3o encontrado"), ...COMMON_ERRORS }
3511
+ }
3512
+ },
3513
+ "/inbox/documents": {
3514
+ get: {
3515
+ tags: ["Caixa de Entrada"],
3516
+ summary: "Listar documentos da caixa de entrada",
3517
+ operationId: "listInboxDocuments",
3518
+ security: [{ ApiKeyAuth: ["inbox:read"] }],
3519
+ parameters: [
3520
+ ...PAGINATION_PARAMS,
3521
+ { name: "kind", in: "query", description: "Tipo do documento extra\xEDdo (boleto, nfe, guia\u2026).", schema: { type: "string" } },
3522
+ { name: "outcome", in: "query", description: "Desfecho do processamento.", schema: { type: "string" } },
3523
+ { name: "message_id", in: "query", description: "Mensagem de origem.", schema: { type: "string", format: "uuid" } },
3524
+ { name: "supplier_id", in: "query", description: "Fornecedor casado.", schema: { type: "string", format: "uuid" } },
3525
+ { name: "purchase_invoice_id", in: "query", description: "Conta a pagar lan\xE7ada a partir dele.", schema: { type: "string", format: "uuid" } },
3526
+ { name: "due_from", in: "query", description: "Vencimento a partir de.", schema: { type: "string", format: "date" } },
3527
+ { name: "due_to", in: "query", description: "Vencimento at\xE9.", schema: { type: "string", format: "date" } }
3528
+ ],
3529
+ responses: { "200": paginatedResponse("#/components/schemas/InboxDocument"), ...COMMON_ERRORS }
3530
+ }
3531
+ },
3532
+ "/inbox/documents/{id}": {
3533
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3534
+ get: {
3535
+ tags: ["Caixa de Entrada"],
3536
+ summary: "Obter documento da caixa de entrada",
3537
+ operationId: "getInboxDocument",
3538
+ security: [{ ApiKeyAuth: ["inbox:read"] }],
3539
+ responses: { "200": { description: "Documento da caixa de entrada", content: { "application/json": { schema: { $ref: "#/components/schemas/InboxDocument" } } } }, "404": errorResponse("Documento da caixa de entrada n\xE3o encontrado"), ...COMMON_ERRORS }
3540
+ }
3541
+ },
3542
+ "/reconciliation/entries": {
3543
+ get: {
3544
+ tags: ["Concilia\xE7\xE3o"],
3545
+ summary: "Listar lan\xE7amentos do extrato",
3546
+ operationId: "listStatementEntries",
3547
+ security: [{ ApiKeyAuth: ["reconciliation:read"] }],
3548
+ parameters: [
3549
+ ...PAGINATION_PARAMS,
3550
+ { name: "bank_account_id", in: "query", description: "Conta banc\xE1ria.", schema: { type: "string", format: "uuid" } },
3551
+ { name: "entry_type", in: "query", description: "Entrada ou sa\xEDda.", schema: { type: "string" } },
3552
+ { name: "reconciliation_period_id", in: "query", description: "Per\xEDodo de concilia\xE7\xE3o.", schema: { type: "string", format: "uuid" } },
3553
+ { name: "is_ignored", in: "query", description: "Somente ignorados (true) ou n\xE3o ignorados (false).", schema: { type: "string", enum: ["true", "false"] } },
3554
+ { name: "description", in: "query", description: "Descri\xE7\xE3o (busca parcial).", schema: { type: "string" } },
3555
+ { name: "date_from", in: "query", description: "Data do lan\xE7amento a partir de.", schema: { type: "string", format: "date" } },
3556
+ { name: "date_to", in: "query", description: "Data do lan\xE7amento at\xE9.", schema: { type: "string", format: "date" } }
3557
+ ],
3558
+ responses: { "200": paginatedResponse("#/components/schemas/StatementEntry"), ...COMMON_ERRORS }
3559
+ }
3560
+ },
3561
+ "/reconciliation/entries/{id}": {
3562
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3563
+ get: {
3564
+ tags: ["Concilia\xE7\xE3o"],
3565
+ summary: "Obter lan\xE7amento de extrato",
3566
+ operationId: "getStatementEntry",
3567
+ security: [{ ApiKeyAuth: ["reconciliation:read"] }],
3568
+ responses: { "200": { description: "Lan\xE7amento de extrato", content: { "application/json": { schema: { $ref: "#/components/schemas/StatementEntry" } } } }, "404": errorResponse("Lan\xE7amento de extrato n\xE3o encontrado"), ...COMMON_ERRORS }
3569
+ }
3570
+ },
3571
+ "/reconciliation/periods": {
3572
+ get: {
3573
+ tags: ["Concilia\xE7\xE3o"],
3574
+ summary: "Listar per\xEDodos de concilia\xE7\xE3o",
3575
+ operationId: "listReconciliationPeriods",
3576
+ security: [{ ApiKeyAuth: ["reconciliation:read"] }],
3577
+ parameters: [
3578
+ ...PAGINATION_PARAMS,
3579
+ { name: "bank_account_id", in: "query", description: "Conta banc\xE1ria.", schema: { type: "string", format: "uuid" } },
3580
+ { name: "status", in: "query", description: "Estado do per\xEDodo (open, closed\u2026).", schema: { type: "string" } }
3581
+ ],
3582
+ responses: { "200": paginatedResponse("#/components/schemas/ReconciliationPeriod"), ...COMMON_ERRORS }
3583
+ }
3584
+ },
3585
+ "/reconciliation/periods/{id}": {
3586
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3587
+ get: {
3588
+ tags: ["Concilia\xE7\xE3o"],
3589
+ summary: "Obter per\xEDodo de concilia\xE7\xE3o",
3590
+ operationId: "getReconciliationPeriod",
3591
+ security: [{ ApiKeyAuth: ["reconciliation:read"] }],
3592
+ responses: { "200": { description: "Per\xEDodo de concilia\xE7\xE3o", content: { "application/json": { schema: { $ref: "#/components/schemas/ReconciliationPeriod" } } } }, "404": errorResponse("Per\xEDodo de concilia\xE7\xE3o n\xE3o encontrado"), ...COMMON_ERRORS }
3593
+ }
3594
+ },
3595
+ "/card-statements": {
3596
+ get: {
3597
+ tags: ["Cart\xE3o de Cr\xE9dito"],
3598
+ summary: "Listar faturas de cart\xE3o",
3599
+ operationId: "listCardStatements",
3600
+ security: [{ ApiKeyAuth: ["cards:read"] }],
3601
+ parameters: [
3602
+ ...PAGINATION_PARAMS,
3603
+ { name: "bank_account_id", in: "query", description: "Cart\xE3o (conta banc\xE1ria do tipo cart\xE3o).", schema: { type: "string", format: "uuid" } },
3604
+ { name: "status", in: "query", description: "aberta, fechada ou paga.", schema: { type: "string" } },
3605
+ { name: "reference_month", in: "query", description: "M\xEAs de compet\xEAncia (AAAA-MM-DD do 1\xBA dia).", schema: { type: "string" } },
3606
+ { name: "due_from", in: "query", description: "Vencimento a partir de.", schema: { type: "string", format: "date" } },
3607
+ { name: "due_to", in: "query", description: "Vencimento at\xE9.", schema: { type: "string", format: "date" } }
3608
+ ],
3609
+ responses: { "200": paginatedResponse("#/components/schemas/CardStatement"), ...COMMON_ERRORS }
3610
+ }
3611
+ },
3612
+ "/card-statements/{id}": {
3613
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3614
+ get: {
3615
+ tags: ["Cart\xE3o de Cr\xE9dito"],
3616
+ summary: "Obter fatura de cart\xE3o",
3617
+ operationId: "getCardStatement",
3618
+ security: [{ ApiKeyAuth: ["cards:read"] }],
3619
+ responses: { "200": { description: "Fatura de cart\xE3o", content: { "application/json": { schema: { $ref: "#/components/schemas/CardStatement" } } } }, "404": errorResponse("Fatura de cart\xE3o n\xE3o encontrado"), ...COMMON_ERRORS }
3620
+ }
3621
+ },
3622
+ "/dda-boletos": {
3623
+ get: {
3624
+ tags: ["DDA"],
3625
+ summary: "Listar boletos do DDA",
3626
+ operationId: "listDdaBoletos",
3627
+ security: [{ ApiKeyAuth: ["dda:read"] }],
3628
+ parameters: [
3629
+ ...PAGINATION_PARAMS,
3630
+ { name: "match_status", in: "query", description: "Situa\xE7\xE3o do casamento com uma conta a pagar.", schema: { type: "string" } },
3631
+ { name: "supplier_id", in: "query", description: "Fornecedor casado.", schema: { type: "string", format: "uuid" } },
3632
+ { name: "overdue", in: "query", description: "Somente vencidos (true).", schema: { type: "string", enum: ["true", "false"] } },
3633
+ { name: "beneficiary_name", in: "query", description: "Benefici\xE1rio (busca parcial).", schema: { type: "string" } },
3634
+ { name: "due_from", in: "query", description: "Vencimento a partir de.", schema: { type: "string", format: "date" } },
3635
+ { name: "due_to", in: "query", description: "Vencimento at\xE9.", schema: { type: "string", format: "date" } }
3636
+ ],
3637
+ responses: { "200": paginatedResponse("#/components/schemas/DdaBoleto"), ...COMMON_ERRORS }
3638
+ }
3639
+ },
3640
+ "/dda-boletos/{id}": {
3641
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3642
+ get: {
3643
+ tags: ["DDA"],
3644
+ summary: "Obter boleto de dda",
3645
+ operationId: "getDdaBoleto",
3646
+ security: [{ ApiKeyAuth: ["dda:read"] }],
3647
+ responses: { "200": { description: "Boleto de DDA", content: { "application/json": { schema: { $ref: "#/components/schemas/DdaBoleto" } } } }, "404": errorResponse("Boleto de DDA n\xE3o encontrado"), ...COMMON_ERRORS }
3648
+ }
3649
+ },
3650
+ "/recurring-expenses": {
3651
+ get: {
3652
+ tags: ["Recorrentes"],
3653
+ summary: "Listar despesas recorrentes",
3654
+ operationId: "listRecurringExpenses",
3655
+ security: [{ ApiKeyAuth: ["recurring:read"] }],
3656
+ parameters: [
3657
+ ...PAGINATION_PARAMS,
3658
+ { name: "status", in: "query", description: "Estado da regra (ativa, pausada\u2026).", schema: { type: "string" } },
3659
+ { name: "supplier_id", in: "query", description: "Fornecedor.", schema: { type: "string", format: "uuid" } },
3660
+ { name: "frequency", in: "query", description: "Periodicidade.", schema: { type: "string" } },
3661
+ { name: "next_from", in: "query", description: "Pr\xF3xima gera\xE7\xE3o a partir de.", schema: { type: "string", format: "date" } },
3662
+ { name: "next_to", in: "query", description: "Pr\xF3xima gera\xE7\xE3o at\xE9.", schema: { type: "string", format: "date" } }
3663
+ ],
3664
+ responses: { "200": paginatedResponse("#/components/schemas/RecurringExpense"), ...COMMON_ERRORS }
3665
+ }
3666
+ },
3667
+ "/recurring-expenses/{id}": {
3668
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3669
+ get: {
3670
+ tags: ["Recorrentes"],
3671
+ summary: "Obter despesa recorrente",
3672
+ operationId: "getRecurringExpense",
3673
+ security: [{ ApiKeyAuth: ["recurring:read"] }],
3674
+ responses: { "200": { description: "Despesa recorrente", content: { "application/json": { schema: { $ref: "#/components/schemas/RecurringExpense" } } } }, "404": errorResponse("Despesa recorrente n\xE3o encontrado"), ...COMMON_ERRORS }
3675
+ }
3676
+ },
3677
+ "/recurring-purchase-invoices": {
3678
+ get: {
3679
+ tags: ["Recorrentes"],
3680
+ summary: "Listar contas a pagar recorrentes",
3681
+ operationId: "listRecurringPurchaseInvoices",
3682
+ security: [{ ApiKeyAuth: ["recurring:read"] }],
3683
+ parameters: [
3684
+ ...PAGINATION_PARAMS,
3685
+ { name: "status", in: "query", description: "Estado da regra.", schema: { type: "string" } },
3686
+ { name: "supplier_id", in: "query", description: "Fornecedor.", schema: { type: "string", format: "uuid" } },
3687
+ { name: "frequency", in: "query", description: "Periodicidade.", schema: { type: "string" } },
3688
+ { name: "next_from", in: "query", description: "Pr\xF3xima gera\xE7\xE3o a partir de.", schema: { type: "string", format: "date" } },
3689
+ { name: "next_to", in: "query", description: "Pr\xF3xima gera\xE7\xE3o at\xE9.", schema: { type: "string", format: "date" } }
3690
+ ],
3691
+ responses: { "200": paginatedResponse("#/components/schemas/RecurringPurchaseInvoice"), ...COMMON_ERRORS }
3692
+ }
3693
+ },
3694
+ "/recurring-purchase-invoices/{id}": {
3695
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3696
+ get: {
3697
+ tags: ["Recorrentes"],
3698
+ summary: "Obter conta a pagar recorrente",
3699
+ operationId: "getRecurringPurchaseInvoice",
3700
+ security: [{ ApiKeyAuth: ["recurring:read"] }],
3701
+ responses: { "200": { description: "Conta a pagar recorrente", content: { "application/json": { schema: { $ref: "#/components/schemas/RecurringPurchaseInvoice" } } } }, "404": errorResponse("Conta a pagar recorrente n\xE3o encontrado"), ...COMMON_ERRORS }
3702
+ }
3703
+ },
3704
+ "/insumos": {
3705
+ get: {
3706
+ tags: ["Insumos"],
3707
+ summary: "Listar insumos",
3708
+ operationId: "listInsumos",
3709
+ security: [{ ApiKeyAuth: ["insumos:read"] }],
3710
+ parameters: [
3711
+ ...PAGINATION_PARAMS,
3712
+ { name: "name", in: "query", description: "Nome (busca parcial).", schema: { type: "string" } },
3713
+ { name: "active", in: "query", description: "Somente ativos (true) ou inativos (false).", schema: { type: "string", enum: ["true", "false"] } }
3714
+ ],
3715
+ responses: { "200": paginatedResponse("#/components/schemas/Insumo"), ...COMMON_ERRORS }
3716
+ }
3717
+ },
3718
+ "/insumos/{id}": {
3719
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3720
+ get: {
3721
+ tags: ["Insumos"],
3722
+ summary: "Obter insumo",
3723
+ operationId: "getInsumo",
3724
+ security: [{ ApiKeyAuth: ["insumos:read"] }],
3725
+ responses: { "200": { description: "Insumo", content: { "application/json": { schema: { $ref: "#/components/schemas/Insumo" } } } }, "404": errorResponse("Insumo n\xE3o encontrado"), ...COMMON_ERRORS }
3726
+ }
3727
+ },
3728
+ "/notifications": {
3729
+ get: {
3730
+ tags: ["Notifica\xE7\xF5es"],
3731
+ summary: "Listar notifica\xE7\xF5es",
3732
+ operationId: "listNotifications",
3733
+ security: [{ ApiKeyAuth: ["notifications:read"] }],
3734
+ parameters: [
3735
+ ...PAGINATION_PARAMS,
3736
+ { name: "type", in: "query", description: "Tipo da notifica\xE7\xE3o.", schema: { type: "string" } },
3737
+ { name: "entity_type", in: "query", description: "Entidade relacionada.", schema: { type: "string" } },
3738
+ { name: "entity_id", in: "query", description: "Id da entidade relacionada.", schema: { type: "string", format: "uuid" } },
3739
+ { name: "user_id", in: "query", description: "Destinat\xE1rio.", schema: { type: "string", format: "uuid" } },
3740
+ { name: "created_from", in: "query", description: "Criadas a partir de.", schema: { type: "string", format: "date" } },
3741
+ { name: "created_to", in: "query", description: "Criadas at\xE9.", schema: { type: "string", format: "date" } }
3742
+ ],
3743
+ responses: { "200": paginatedResponse("#/components/schemas/Notification"), ...COMMON_ERRORS }
3744
+ }
3745
+ },
3746
+ "/notifications/{id}": {
3747
+ parameters: [{ name: "id", in: "path", required: true, schema: { type: "string", format: "uuid" } }],
3748
+ get: {
3749
+ tags: ["Notifica\xE7\xF5es"],
3750
+ summary: "Obter notifica\xE7\xE3o",
3751
+ operationId: "getNotification",
3752
+ security: [{ ApiKeyAuth: ["notifications:read"] }],
3753
+ responses: { "200": { description: "Notifica\xE7\xE3o", content: { "application/json": { schema: { $ref: "#/components/schemas/Notification" } } } }, "404": errorResponse("Notifica\xE7\xE3o n\xE3o encontrado"), ...COMMON_ERRORS }
3754
+ }
3755
+ },
3236
3756
  "/bank-accounts": {
3237
3757
  get: {
3238
3758
  tags: ["Contas banc\xE1rias"],
@@ -3650,6 +4170,55 @@ var API_MODULES = [
3650
4170
  { key: "delete", label: "Excluir regra", description: "Remover regras de split" }
3651
4171
  ]
3652
4172
  },
4173
+ {
4174
+ key: "inbox",
4175
+ label: "Caixa de Entrada",
4176
+ permissions: [
4177
+ { key: "read", label: "Consultar mensagens e documentos", description: "Ver os e-mails recebidos e os boletos/notas extra\xEDdos deles" }
4178
+ ]
4179
+ },
4180
+ {
4181
+ key: "reconciliation",
4182
+ label: "Concilia\xE7\xE3o Banc\xE1ria",
4183
+ permissions: [
4184
+ { key: "read", label: "Consultar extrato e per\xEDodos", description: "Ver lan\xE7amentos do extrato e os per\xEDodos de concilia\xE7\xE3o" }
4185
+ ]
4186
+ },
4187
+ {
4188
+ key: "cards",
4189
+ label: "Cart\xE3o de Cr\xE9dito",
4190
+ permissions: [
4191
+ { key: "read", label: "Consultar faturas", description: "Ver as faturas de cart\xE3o, com fechamento, vencimento e total" }
4192
+ ]
4193
+ },
4194
+ {
4195
+ key: "dda",
4196
+ label: "DDA",
4197
+ permissions: [
4198
+ { key: "read", label: "Consultar boletos", description: "Ver os boletos que o banco avisou por DDA e o status de casamento" }
4199
+ ]
4200
+ },
4201
+ {
4202
+ key: "recurring",
4203
+ label: "Recorrentes",
4204
+ permissions: [
4205
+ { key: "read", label: "Consultar regras", description: "Ver as regras que geram despesas e contas a pagar recorrentes" }
4206
+ ]
4207
+ },
4208
+ {
4209
+ key: "insumos",
4210
+ label: "Insumos",
4211
+ permissions: [
4212
+ { key: "read", label: "Listar e visualizar", description: "Consultar o cat\xE1logo de insumos" }
4213
+ ]
4214
+ },
4215
+ {
4216
+ key: "notifications",
4217
+ label: "Notifica\xE7\xF5es",
4218
+ permissions: [
4219
+ { key: "read", label: "Consultar notifica\xE7\xF5es", description: "Ver as notifica\xE7\xF5es geradas para os usu\xE1rios da empresa" }
4220
+ ]
4221
+ },
3653
4222
  {
3654
4223
  key: "audit",
3655
4224
  label: "Auditoria",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comando.one/mcp-server",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Servidor MCP (Model Context Protocol) para a API pública do Comando1 — opere seu ERP por linguagem natural.",
5
5
  "type": "module",
6
6
  "license": "MIT",