@digipair/skill-vespa 0.21.6 → 0.21.7
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/index.cjs.js +8 -8
- package/index.esm.js +8 -8
- package/package.json +1 -1
- package/schema.json +9 -0
package/index.cjs.js
CHANGED
@@ -63882,14 +63882,14 @@ function indent(str, spaces) {
|
|
63882
63882
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
63883
63883
|
// match is required
|
63884
63884
|
if (!match) {
|
63885
|
-
return i = i1,
|
63885
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
63886
63886
|
v: nextMatch1
|
63887
63887
|
};
|
63888
63888
|
}
|
63889
63889
|
var token = match.token, offset = match.offset;
|
63890
63890
|
i1 += offset;
|
63891
63891
|
if (token === " ") {
|
63892
|
-
return i = i1,
|
63892
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
63893
63893
|
}
|
63894
63894
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
63895
63895
|
token
|
@@ -63908,7 +63908,7 @@ function indent(str, spaces) {
|
|
63908
63908
|
if (contextKeys.some(function(el) {
|
63909
63909
|
return el.startsWith(name);
|
63910
63910
|
})) {
|
63911
|
-
return i = i1,
|
63911
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
63912
63912
|
}
|
63913
63913
|
if (dateTimeIdentifiers.some(function(el) {
|
63914
63914
|
return el === name;
|
@@ -63927,9 +63927,9 @@ function indent(str, spaces) {
|
|
63927
63927
|
if (dateTimeIdentifiers.some(function(el) {
|
63928
63928
|
return el.startsWith(name);
|
63929
63929
|
})) {
|
63930
|
-
return i = i1,
|
63930
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
63931
63931
|
}
|
63932
|
-
return i = i1,
|
63932
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
63933
63933
|
v: nextMatch1
|
63934
63934
|
};
|
63935
63935
|
};
|
@@ -67869,7 +67869,7 @@ let VespaService = class VespaService {
|
|
67869
67869
|
console.error('Error - VespaService:getDocuments - fetching', (_error_root_errors = (_error_root = error.root) == null ? void 0 : _error_root.errors) != null ? _error_root_errors : error);
|
67870
67870
|
throw new Error(`Error - VespaService:getDocuments - fetching ${collection}`);
|
67871
67871
|
}
|
67872
|
-
const messages = ((await response.json()).root.children || []).map((child)=>child.fields);
|
67872
|
+
const messages = ((await response.json()).root.children || []).map((child)=>child.id === 'group:root:0' ? child.children[0].children : child.fields);
|
67873
67873
|
return messages;
|
67874
67874
|
}
|
67875
67875
|
async searchParentDocuments(baseUrl, collection, query, options = {}) {
|
@@ -67966,12 +67966,12 @@ let VespaService = class VespaService {
|
|
67966
67966
|
}
|
67967
67967
|
async find(params, _pinsSettingsList, context) {
|
67968
67968
|
var _context_privates_VESPA_SERVER;
|
67969
|
-
const { baseUrl = (_context_privates_VESPA_SERVER = context.privates.VESPA_SERVER) != null ? _context_privates_VESPA_SERVER : VESPA_SERVER, collection = 'knowledge', limit = 100, orderby = '', query } = params;
|
67969
|
+
const { baseUrl = (_context_privates_VESPA_SERVER = context.privates.VESPA_SERVER) != null ? _context_privates_VESPA_SERVER : VESPA_SERVER, collection = 'knowledge', limit = 100, orderby = '', query, grouping } = params;
|
67970
67970
|
if (orderby !== '' && !/^([a-zA-Z0-9_-]+)(,\s*[a-zA-Z0-9_-]+)*(\s+(asc|desc))?$/.test(orderby)) {
|
67971
67971
|
throw new Error('vespa:find - Invalid orderby parameter');
|
67972
67972
|
}
|
67973
67973
|
const orderbySecured = orderby === '' ? '' : `order by ${orderby}`;
|
67974
|
-
const results = await this.searchDocuments(baseUrl, collection, `is_parent = true and userQuery() ${orderbySecured} limit ${parseInt(limit)}
|
67974
|
+
const results = await this.searchDocuments(baseUrl, collection, `is_parent = true and userQuery() ${orderbySecured} limit ${parseInt(limit)}` + (grouping ? ` | ${grouping}` : ''), {
|
67975
67975
|
query
|
67976
67976
|
});
|
67977
67977
|
return results;
|
package/index.esm.js
CHANGED
@@ -63860,14 +63860,14 @@ function indent(str, spaces) {
|
|
63860
63860
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
63861
63861
|
// match is required
|
63862
63862
|
if (!match) {
|
63863
|
-
return
|
63863
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
63864
63864
|
v: nextMatch1
|
63865
63865
|
};
|
63866
63866
|
}
|
63867
63867
|
var token = match.token, offset = match.offset;
|
63868
63868
|
i1 += offset;
|
63869
63869
|
if (token === " ") {
|
63870
|
-
return
|
63870
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
63871
63871
|
}
|
63872
63872
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
63873
63873
|
token
|
@@ -63886,7 +63886,7 @@ function indent(str, spaces) {
|
|
63886
63886
|
if (contextKeys.some(function(el) {
|
63887
63887
|
return el.startsWith(name);
|
63888
63888
|
})) {
|
63889
|
-
return
|
63889
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
63890
63890
|
}
|
63891
63891
|
if (dateTimeIdentifiers.some(function(el) {
|
63892
63892
|
return el === name;
|
@@ -63905,9 +63905,9 @@ function indent(str, spaces) {
|
|
63905
63905
|
if (dateTimeIdentifiers.some(function(el) {
|
63906
63906
|
return el.startsWith(name);
|
63907
63907
|
})) {
|
63908
|
-
return
|
63908
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
63909
63909
|
}
|
63910
|
-
return
|
63910
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
63911
63911
|
v: nextMatch1
|
63912
63912
|
};
|
63913
63913
|
};
|
@@ -67847,7 +67847,7 @@ let VespaService = class VespaService {
|
|
67847
67847
|
console.error('Error - VespaService:getDocuments - fetching', (_error_root_errors = (_error_root = error.root) == null ? void 0 : _error_root.errors) != null ? _error_root_errors : error);
|
67848
67848
|
throw new Error(`Error - VespaService:getDocuments - fetching ${collection}`);
|
67849
67849
|
}
|
67850
|
-
const messages = ((await response.json()).root.children || []).map((child)=>child.fields);
|
67850
|
+
const messages = ((await response.json()).root.children || []).map((child)=>child.id === 'group:root:0' ? child.children[0].children : child.fields);
|
67851
67851
|
return messages;
|
67852
67852
|
}
|
67853
67853
|
async searchParentDocuments(baseUrl, collection, query, options = {}) {
|
@@ -67944,12 +67944,12 @@ let VespaService = class VespaService {
|
|
67944
67944
|
}
|
67945
67945
|
async find(params, _pinsSettingsList, context) {
|
67946
67946
|
var _context_privates_VESPA_SERVER;
|
67947
|
-
const { baseUrl = (_context_privates_VESPA_SERVER = context.privates.VESPA_SERVER) != null ? _context_privates_VESPA_SERVER : VESPA_SERVER, collection = 'knowledge', limit = 100, orderby = '', query } = params;
|
67947
|
+
const { baseUrl = (_context_privates_VESPA_SERVER = context.privates.VESPA_SERVER) != null ? _context_privates_VESPA_SERVER : VESPA_SERVER, collection = 'knowledge', limit = 100, orderby = '', query, grouping } = params;
|
67948
67948
|
if (orderby !== '' && !/^([a-zA-Z0-9_-]+)(,\s*[a-zA-Z0-9_-]+)*(\s+(asc|desc))?$/.test(orderby)) {
|
67949
67949
|
throw new Error('vespa:find - Invalid orderby parameter');
|
67950
67950
|
}
|
67951
67951
|
const orderbySecured = orderby === '' ? '' : `order by ${orderby}`;
|
67952
|
-
const results = await this.searchDocuments(baseUrl, collection, `is_parent = true and userQuery() ${orderbySecured} limit ${parseInt(limit)}
|
67952
|
+
const results = await this.searchDocuments(baseUrl, collection, `is_parent = true and userQuery() ${orderbySecured} limit ${parseInt(limit)}` + (grouping ? ` | ${grouping}` : ''), {
|
67953
67953
|
query
|
67954
67954
|
});
|
67955
67955
|
return results;
|
package/package.json
CHANGED
package/schema.json
CHANGED
@@ -58,6 +58,15 @@
|
|
58
58
|
"schema": {
|
59
59
|
"type": "string"
|
60
60
|
}
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"name": "grouping",
|
64
|
+
"summary": "Filtre de regroupement",
|
65
|
+
"required": false,
|
66
|
+
"description": "Filtre de regroupement des réponses",
|
67
|
+
"schema": {
|
68
|
+
"type": "string"
|
69
|
+
}
|
61
70
|
}
|
62
71
|
],
|
63
72
|
"x-events": []
|