@quantyapp/quanty-mcp-server 1.0.9 → 1.0.10

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.
@@ -10,7 +10,7 @@ function isItemComposition(item) {
10
10
  return false;
11
11
  }
12
12
  function extractCompositionInputs(item) {
13
- const sources = ['composition', 'children', 'insumos', 'items', 'components'];
13
+ const sources = ['composition', 'children', 'insumos', 'items', 'components', 'compositionItems'];
14
14
  for (const key of sources) {
15
15
  if (item[key] && Array.isArray(item[key]) && item[key].length > 0) {
16
16
  return item[key].map((input) => ({
@@ -167,7 +167,7 @@ export async function searchBankItems(bankId, query, limit = 50) {
167
167
  // Busca recursiva em todas as propriedades que podem conter filhos
168
168
  // NOTA: 'composition' e 'items' dentro de um item podem ser ignorados se quisermos só buscar itens "pai"
169
169
  // mas para profundidade máxima vamos varrer tudo. O addIfMatches filtra duplicatas pelo ID.
170
- const childKeys = ['items', 'children', 'composition', 'categories', 'rows'];
170
+ const childKeys = ['items', 'children', 'composition', 'categories', 'rows', 'compositionItems'];
171
171
  for (const key of childKeys) {
172
172
  if (node[key] && Array.isArray(node[key])) {
173
173
  if (!searchRecursive(node[key]))
@@ -248,7 +248,7 @@ export async function getBankItemById(bankId, itemId) {
248
248
  return true;
249
249
  }
250
250
  // Busca em filhos
251
- const childKeys = ['items', 'children', 'composition', 'categories', 'rows'];
251
+ const childKeys = ['items', 'children', 'composition', 'categories', 'rows', 'compositionItems'];
252
252
  for (const key of childKeys) {
253
253
  if (node[key] && Array.isArray(node[key])) {
254
254
  if (findById(node[key]))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantyapp/quanty-mcp-server",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "MCP Server para conectar Claude Desktop ao Quanty - Sistema de Orçamentos de Engenharia",
5
5
  "type": "module",
6
6
  "main": "dist/mcp/index.js",