@digipair/skill-vespa 0.136.4 → 0.137.1
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.cjs.js +2 -2
- package/dist/index.esm.js +7 -7
- package/dist/schema.fr.json +9 -0
- package/dist/schema.json +9 -0
- package/dist/src/lib/skill-vespa.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -57442,12 +57442,12 @@ let VespaService = class VespaService {
|
|
|
57442
57442
|
return results;
|
|
57443
57443
|
}
|
|
57444
57444
|
async find(params, _pinsSettingsList, context) {
|
|
57445
|
-
const { baseUrl = context.privates.VESPA_SERVER ?? VESPA_SERVER, collection = 'knowledge', limit = 100, orderby = '', query, grouping } = params;
|
|
57445
|
+
const { baseUrl = context.privates.VESPA_SERVER ?? VESPA_SERVER, collection = 'knowledge', limit = 100, orderby = '', query, filter = 'true', grouping } = params;
|
|
57446
57446
|
if (orderby !== '' && !/^([a-zA-Z0-9_-]+)(,\s*[a-zA-Z0-9_-]+)*(\s+(asc|desc))?$/.test(orderby)) {
|
|
57447
57447
|
throw new Error('vespa:find - Invalid orderby parameter');
|
|
57448
57448
|
}
|
|
57449
57449
|
const orderbySecured = orderby === '' ? '' : `order by ${orderby}`;
|
|
57450
|
-
const results = await this.searchDocuments(baseUrl, collection, `is_parent = true and userQuery() ${orderbySecured} limit ${parseInt(limit)}` + (grouping ? ` | ${grouping}` : ''), {
|
|
57450
|
+
const results = await this.searchDocuments(baseUrl, collection, `is_parent = true and userQuery() and (${filter}) ${orderbySecured} limit ${parseInt(limit)}` + (grouping ? ` | ${grouping}` : ''), {
|
|
57451
57451
|
query
|
|
57452
57452
|
}, context.protected?.signal);
|
|
57453
57453
|
return results;
|
package/dist/index.esm.js
CHANGED
|
@@ -80356,14 +80356,14 @@ function indent(str, spaces) {
|
|
|
80356
80356
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
80357
80357
|
// match is required
|
|
80358
80358
|
if (!match) {
|
|
80359
|
-
return
|
|
80359
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
80360
80360
|
v: nextMatch1
|
|
80361
80361
|
};
|
|
80362
80362
|
}
|
|
80363
80363
|
var token = match.token, offset = match.offset;
|
|
80364
80364
|
i1 += offset;
|
|
80365
80365
|
if (token === ' ') {
|
|
80366
|
-
return
|
|
80366
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
80367
80367
|
}
|
|
80368
80368
|
tokens1 = _to_consumable_array$4(tokens1).concat([
|
|
80369
80369
|
token
|
|
@@ -80382,7 +80382,7 @@ function indent(str, spaces) {
|
|
|
80382
80382
|
if (contextKeys.some(function(el) {
|
|
80383
80383
|
return el.startsWith(name);
|
|
80384
80384
|
})) {
|
|
80385
|
-
return
|
|
80385
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
80386
80386
|
}
|
|
80387
80387
|
if (dateTimeIdentifiers.some(function(el) {
|
|
80388
80388
|
return el === name;
|
|
@@ -80401,9 +80401,9 @@ function indent(str, spaces) {
|
|
|
80401
80401
|
if (dateTimeIdentifiers.some(function(el) {
|
|
80402
80402
|
return el.startsWith(name);
|
|
80403
80403
|
})) {
|
|
80404
|
-
return
|
|
80404
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
80405
80405
|
}
|
|
80406
|
-
return
|
|
80406
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
80407
80407
|
v: nextMatch1
|
|
80408
80408
|
};
|
|
80409
80409
|
};
|
|
@@ -102237,12 +102237,12 @@ let VespaService = class VespaService {
|
|
|
102237
102237
|
return results;
|
|
102238
102238
|
}
|
|
102239
102239
|
async find(params, _pinsSettingsList, context) {
|
|
102240
|
-
const { baseUrl = context.privates.VESPA_SERVER ?? VESPA_SERVER, collection = 'knowledge', limit = 100, orderby = '', query, grouping } = params;
|
|
102240
|
+
const { baseUrl = context.privates.VESPA_SERVER ?? VESPA_SERVER, collection = 'knowledge', limit = 100, orderby = '', query, filter = 'true', grouping } = params;
|
|
102241
102241
|
if (orderby !== '' && !/^([a-zA-Z0-9_-]+)(,\s*[a-zA-Z0-9_-]+)*(\s+(asc|desc))?$/.test(orderby)) {
|
|
102242
102242
|
throw new Error('vespa:find - Invalid orderby parameter');
|
|
102243
102243
|
}
|
|
102244
102244
|
const orderbySecured = orderby === '' ? '' : `order by ${orderby}`;
|
|
102245
|
-
const results = await this.searchDocuments(baseUrl, collection, `is_parent = true and userQuery() ${orderbySecured} limit ${parseInt(limit)}` + (grouping ? ` | ${grouping}` : ''), {
|
|
102245
|
+
const results = await this.searchDocuments(baseUrl, collection, `is_parent = true and userQuery() and (${filter}) ${orderbySecured} limit ${parseInt(limit)}` + (grouping ? ` | ${grouping}` : ''), {
|
|
102246
102246
|
query
|
|
102247
102247
|
}, context.protected?.signal);
|
|
102248
102248
|
return results;
|
package/dist/schema.fr.json
CHANGED
|
@@ -68,6 +68,15 @@
|
|
|
68
68
|
"type": "string"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
+
{
|
|
72
|
+
"name": "filter",
|
|
73
|
+
"summary": "Filtres",
|
|
74
|
+
"required": false,
|
|
75
|
+
"description": "Filtres de recherche",
|
|
76
|
+
"schema": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
71
80
|
{
|
|
72
81
|
"name": "grouping",
|
|
73
82
|
"summary": "Filtre de regroupement",
|
package/dist/schema.json
CHANGED
|
@@ -68,6 +68,15 @@
|
|
|
68
68
|
"type": "string"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
+
{
|
|
72
|
+
"name": "filter",
|
|
73
|
+
"summary": "Filters",
|
|
74
|
+
"required": false,
|
|
75
|
+
"description": "Search filters",
|
|
76
|
+
"schema": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
71
80
|
{
|
|
72
81
|
"name": "grouping",
|
|
73
82
|
"summary": "Grouping filter",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-vespa.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-vespa.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAmB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-vespa.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-vespa.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAmB,MAAM,kBAAkB,CAAC;AAsXjE,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACpB,CAAC;AAE7D,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACpB,CAAC;AAE/D,eAAO,MAAM,YAAY,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACpB,CAAC;AAErE,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACpB,CAAC;AAE7D,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACpB,CAAC;AAE/D,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACpB,CAAC"}
|