@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.
- package/dist/core/bankService.js +3 -3
- package/package.json +1 -1
package/dist/core/bankService.js
CHANGED
|
@@ -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