@digipair/skill-vespa 0.88.5 → 0.89.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.
- package/index.cjs.js +25 -0
- package/index.esm.js +30 -6
- package/libs/skill-vespa/src/lib/skill-vespa.d.ts +1 -0
- package/package.json +1 -1
- package/schema.fr.json +91 -0
- package/schema.json +91 -0
package/index.cjs.js
CHANGED
@@ -49016,15 +49016,40 @@ let VespaService = class VespaService {
|
|
49016
49016
|
}
|
49017
49017
|
return await response.json();
|
49018
49018
|
}
|
49019
|
+
async update(params, _pinsSettingsList, context) {
|
49020
|
+
var _context_privates_VESPA_SERVER, _context_privates_VESPA_NAMESPACE, _ref;
|
49021
|
+
const { baseUrl = (_context_privates_VESPA_SERVER = context.privates.VESPA_SERVER) != null ? _context_privates_VESPA_SERVER : VESPA_SERVER, namespace = (_ref = (_context_privates_VESPA_NAMESPACE = context.privates.VESPA_NAMESPACE) != null ? _context_privates_VESPA_NAMESPACE : process.env['VESPA_NAMESPACE']) != null ? _ref : 'Digipair_default', collection, id, fields } = params;
|
49022
|
+
let response = await fetch(`${baseUrl}/document/v1/${namespace}/${collection}/docid/${id}`, {
|
49023
|
+
signal: context.protected.signal,
|
49024
|
+
method: 'GET',
|
49025
|
+
headers: {
|
49026
|
+
'Content-Type': 'application/json'
|
49027
|
+
}
|
49028
|
+
});
|
49029
|
+
const document = (await response.json()).fields;
|
49030
|
+
response = await fetch(`${baseUrl}/document/v1/${namespace}/${collection}/docid/${id}`, {
|
49031
|
+
signal: context.protected.signal,
|
49032
|
+
method: 'POST',
|
49033
|
+
body: JSON.stringify({
|
49034
|
+
fields: _extends({}, document, fields)
|
49035
|
+
}),
|
49036
|
+
headers: {
|
49037
|
+
'Content-Type': 'application/json'
|
49038
|
+
}
|
49039
|
+
});
|
49040
|
+
return await response.json();
|
49041
|
+
}
|
49019
49042
|
};
|
49020
49043
|
const find = (params, pinsSettingsList, context)=>new VespaService().find(params, pinsSettingsList, context);
|
49021
49044
|
const search = (params, pinsSettingsList, context)=>new VespaService().search(params, pinsSettingsList, context);
|
49022
49045
|
const textSplitter = (params, pinsSettingsList, context)=>new VespaService().textSplitter(params, pinsSettingsList, context);
|
49023
49046
|
const push = (params, pinsSettingsList, context)=>new VespaService().push(params, pinsSettingsList, context);
|
49024
49047
|
const remove = (params, pinsSettingsList, context)=>new VespaService().remove(params, pinsSettingsList, context);
|
49048
|
+
const update = (params, pinsSettingsList, context)=>new VespaService().update(params, pinsSettingsList, context);
|
49025
49049
|
|
49026
49050
|
exports.find = find;
|
49027
49051
|
exports.push = push;
|
49028
49052
|
exports.remove = remove;
|
49029
49053
|
exports.search = search;
|
49030
49054
|
exports.textSplitter = textSplitter;
|
49055
|
+
exports.update = update;
|
package/index.esm.js
CHANGED
@@ -72686,14 +72686,14 @@ function indent(str, spaces) {
|
|
72686
72686
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
72687
72687
|
// match is required
|
72688
72688
|
if (!match) {
|
72689
|
-
return
|
72689
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
72690
72690
|
v: nextMatch1
|
72691
72691
|
};
|
72692
72692
|
}
|
72693
72693
|
var token = match.token, offset = match.offset;
|
72694
72694
|
i1 += offset;
|
72695
72695
|
if (token === " ") {
|
72696
|
-
return
|
72696
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
72697
72697
|
}
|
72698
72698
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
72699
72699
|
token
|
@@ -72712,7 +72712,7 @@ function indent(str, spaces) {
|
|
72712
72712
|
if (contextKeys.some(function(el) {
|
72713
72713
|
return el.startsWith(name);
|
72714
72714
|
})) {
|
72715
|
-
return
|
72715
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
72716
72716
|
}
|
72717
72717
|
if (dateTimeIdentifiers.some(function(el) {
|
72718
72718
|
return el === name;
|
@@ -72731,9 +72731,9 @@ function indent(str, spaces) {
|
|
72731
72731
|
if (dateTimeIdentifiers.some(function(el) {
|
72732
72732
|
return el.startsWith(name);
|
72733
72733
|
})) {
|
72734
|
-
return
|
72734
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
72735
72735
|
}
|
72736
|
-
return
|
72736
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
72737
72737
|
v: nextMatch1
|
72738
72738
|
};
|
72739
72739
|
};
|
@@ -76981,11 +76981,35 @@ let VespaService = class VespaService {
|
|
76981
76981
|
}
|
76982
76982
|
return await response.json();
|
76983
76983
|
}
|
76984
|
+
async update(params, _pinsSettingsList, context) {
|
76985
|
+
var _context_privates_VESPA_SERVER, _context_privates_VESPA_NAMESPACE, _ref;
|
76986
|
+
const { baseUrl = (_context_privates_VESPA_SERVER = context.privates.VESPA_SERVER) != null ? _context_privates_VESPA_SERVER : VESPA_SERVER, namespace = (_ref = (_context_privates_VESPA_NAMESPACE = context.privates.VESPA_NAMESPACE) != null ? _context_privates_VESPA_NAMESPACE : process.env['VESPA_NAMESPACE']) != null ? _ref : 'Digipair_default', collection, id, fields } = params;
|
76987
|
+
let response = await fetch(`${baseUrl}/document/v1/${namespace}/${collection}/docid/${id}`, {
|
76988
|
+
signal: context.protected.signal,
|
76989
|
+
method: 'GET',
|
76990
|
+
headers: {
|
76991
|
+
'Content-Type': 'application/json'
|
76992
|
+
}
|
76993
|
+
});
|
76994
|
+
const document = (await response.json()).fields;
|
76995
|
+
response = await fetch(`${baseUrl}/document/v1/${namespace}/${collection}/docid/${id}`, {
|
76996
|
+
signal: context.protected.signal,
|
76997
|
+
method: 'POST',
|
76998
|
+
body: JSON.stringify({
|
76999
|
+
fields: _extends({}, document, fields)
|
77000
|
+
}),
|
77001
|
+
headers: {
|
77002
|
+
'Content-Type': 'application/json'
|
77003
|
+
}
|
77004
|
+
});
|
77005
|
+
return await response.json();
|
77006
|
+
}
|
76984
77007
|
};
|
76985
77008
|
const find = (params, pinsSettingsList, context)=>new VespaService().find(params, pinsSettingsList, context);
|
76986
77009
|
const search = (params, pinsSettingsList, context)=>new VespaService().search(params, pinsSettingsList, context);
|
76987
77010
|
const textSplitter = (params, pinsSettingsList, context)=>new VespaService().textSplitter(params, pinsSettingsList, context);
|
76988
77011
|
const push = (params, pinsSettingsList, context)=>new VespaService().push(params, pinsSettingsList, context);
|
76989
77012
|
const remove = (params, pinsSettingsList, context)=>new VespaService().remove(params, pinsSettingsList, context);
|
77013
|
+
const update = (params, pinsSettingsList, context)=>new VespaService().update(params, pinsSettingsList, context);
|
76990
77014
|
|
76991
|
-
export { find, push, remove, search, textSplitter };
|
77015
|
+
export { find, push, remove, search, textSplitter, update };
|
@@ -4,3 +4,4 @@ export declare const search: (params: any, pinsSettingsList: PinsSettings[], con
|
|
4
4
|
export declare const textSplitter: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
5
5
|
export declare const push: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
6
6
|
export declare const remove: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
7
|
+
export declare const update: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
@@ -23,6 +23,15 @@
|
|
23
23
|
"type": "string"
|
24
24
|
}
|
25
25
|
},
|
26
|
+
{
|
27
|
+
"name": "namespace",
|
28
|
+
"summary": "Espace de noms",
|
29
|
+
"required": false,
|
30
|
+
"description": "Espace de noms de la session",
|
31
|
+
"schema": {
|
32
|
+
"type": "string"
|
33
|
+
}
|
34
|
+
},
|
26
35
|
{
|
27
36
|
"name": "collection",
|
28
37
|
"summary": "Nom de la collection",
|
@@ -99,6 +108,15 @@
|
|
99
108
|
"type": "string"
|
100
109
|
}
|
101
110
|
},
|
111
|
+
{
|
112
|
+
"name": "namespace",
|
113
|
+
"summary": "Espace de noms",
|
114
|
+
"required": false,
|
115
|
+
"description": "Espace de noms de la session",
|
116
|
+
"schema": {
|
117
|
+
"type": "string"
|
118
|
+
}
|
119
|
+
},
|
102
120
|
{
|
103
121
|
"name": "collection",
|
104
122
|
"summary": "Nom de la collection",
|
@@ -239,6 +257,15 @@
|
|
239
257
|
"type": "string"
|
240
258
|
}
|
241
259
|
},
|
260
|
+
{
|
261
|
+
"name": "namespace",
|
262
|
+
"summary": "Espace de noms",
|
263
|
+
"required": false,
|
264
|
+
"description": "Espace de noms de la session",
|
265
|
+
"schema": {
|
266
|
+
"type": "string"
|
267
|
+
}
|
268
|
+
},
|
242
269
|
{
|
243
270
|
"name": "collection",
|
244
271
|
"summary": "Nom de la Collection",
|
@@ -288,6 +315,15 @@
|
|
288
315
|
"type": "string"
|
289
316
|
}
|
290
317
|
},
|
318
|
+
{
|
319
|
+
"name": "namespace",
|
320
|
+
"summary": "Espace de noms",
|
321
|
+
"required": false,
|
322
|
+
"description": "Espace de noms de la session",
|
323
|
+
"schema": {
|
324
|
+
"type": "string"
|
325
|
+
}
|
326
|
+
},
|
291
327
|
{
|
292
328
|
"name": "collection",
|
293
329
|
"summary": "Nom de la collection",
|
@@ -309,6 +345,61 @@
|
|
309
345
|
],
|
310
346
|
"x-events": []
|
311
347
|
}
|
348
|
+
},
|
349
|
+
"/update": {
|
350
|
+
"post": {
|
351
|
+
"tags": ["service"],
|
352
|
+
"summary": "Mettre à jour",
|
353
|
+
"description": "Met à jour un document dans la base de données.",
|
354
|
+
"parameters": [
|
355
|
+
{
|
356
|
+
"name": "baseUrl",
|
357
|
+
"summary": "Adresse du serveur",
|
358
|
+
"required": false,
|
359
|
+
"description": "Adresse du serveur Vespa",
|
360
|
+
"schema": {
|
361
|
+
"type": "string"
|
362
|
+
}
|
363
|
+
},
|
364
|
+
{
|
365
|
+
"name": "namespace",
|
366
|
+
"summary": "Espace de noms",
|
367
|
+
"required": false,
|
368
|
+
"description": "Espace de noms de la session",
|
369
|
+
"schema": {
|
370
|
+
"type": "string"
|
371
|
+
}
|
372
|
+
},
|
373
|
+
{
|
374
|
+
"name": "id",
|
375
|
+
"summary": "Identifiant de la session",
|
376
|
+
"required": true,
|
377
|
+
"description": "Identifiant de la session à modifier",
|
378
|
+
"schema": {
|
379
|
+
"type": "string"
|
380
|
+
}
|
381
|
+
},
|
382
|
+
{
|
383
|
+
"name": "collection",
|
384
|
+
"summary": "Nom de la collection",
|
385
|
+
"required": true,
|
386
|
+
"description": "Nom de la collection dans laquelle mettre à jour le document",
|
387
|
+
"schema": {
|
388
|
+
"type": "string"
|
389
|
+
}
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"name": "fields",
|
393
|
+
"summary": "Champs",
|
394
|
+
"required": true,
|
395
|
+
"description": "Champs à mettre à jour",
|
396
|
+
"schema": {
|
397
|
+
"type": "object"
|
398
|
+
}
|
399
|
+
}
|
400
|
+
],
|
401
|
+
"x-events": []
|
402
|
+
}
|
312
403
|
}
|
313
404
|
},
|
314
405
|
"components": {
|
package/schema.json
CHANGED
@@ -23,6 +23,15 @@
|
|
23
23
|
"type": "string"
|
24
24
|
}
|
25
25
|
},
|
26
|
+
{
|
27
|
+
"name": "namespace",
|
28
|
+
"summary": "Namespace",
|
29
|
+
"required": false,
|
30
|
+
"description": "Namespace of the document to update",
|
31
|
+
"schema": {
|
32
|
+
"type": "string"
|
33
|
+
}
|
34
|
+
},
|
26
35
|
{
|
27
36
|
"name": "collection",
|
28
37
|
"summary": "Collection name",
|
@@ -99,6 +108,15 @@
|
|
99
108
|
"type": "string"
|
100
109
|
}
|
101
110
|
},
|
111
|
+
{
|
112
|
+
"name": "namespace",
|
113
|
+
"summary": "Namespace",
|
114
|
+
"required": false,
|
115
|
+
"description": "Namespace of the document to update",
|
116
|
+
"schema": {
|
117
|
+
"type": "string"
|
118
|
+
}
|
119
|
+
},
|
102
120
|
{
|
103
121
|
"name": "collection",
|
104
122
|
"summary": "Collection name",
|
@@ -239,6 +257,15 @@
|
|
239
257
|
"type": "string"
|
240
258
|
}
|
241
259
|
},
|
260
|
+
{
|
261
|
+
"name": "namespace",
|
262
|
+
"summary": "Namespace",
|
263
|
+
"required": false,
|
264
|
+
"description": "Namespace of the document to update",
|
265
|
+
"schema": {
|
266
|
+
"type": "string"
|
267
|
+
}
|
268
|
+
},
|
242
269
|
{
|
243
270
|
"name": "collection",
|
244
271
|
"summary": "Collection name",
|
@@ -288,6 +315,15 @@
|
|
288
315
|
"type": "string"
|
289
316
|
}
|
290
317
|
},
|
318
|
+
{
|
319
|
+
"name": "namespace",
|
320
|
+
"summary": "Namespace",
|
321
|
+
"required": false,
|
322
|
+
"description": "Namespace of the document to update",
|
323
|
+
"schema": {
|
324
|
+
"type": "string"
|
325
|
+
}
|
326
|
+
},
|
291
327
|
{
|
292
328
|
"name": "collection",
|
293
329
|
"summary": "Collection name",
|
@@ -309,6 +345,61 @@
|
|
309
345
|
],
|
310
346
|
"x-events": []
|
311
347
|
}
|
348
|
+
},
|
349
|
+
"/update": {
|
350
|
+
"post": {
|
351
|
+
"tags": ["service"],
|
352
|
+
"summary": "Update",
|
353
|
+
"description": "Updates a document in the database.",
|
354
|
+
"parameters": [
|
355
|
+
{
|
356
|
+
"name": "baseUrl",
|
357
|
+
"summary": "Server address",
|
358
|
+
"required": false,
|
359
|
+
"description": "Address of the Vespa server",
|
360
|
+
"schema": {
|
361
|
+
"type": "string"
|
362
|
+
}
|
363
|
+
},
|
364
|
+
{
|
365
|
+
"name": "namespace",
|
366
|
+
"summary": "Namespace",
|
367
|
+
"required": false,
|
368
|
+
"description": "Namespace of the document to update",
|
369
|
+
"schema": {
|
370
|
+
"type": "string"
|
371
|
+
}
|
372
|
+
},
|
373
|
+
{
|
374
|
+
"name": "id",
|
375
|
+
"summary": "ID",
|
376
|
+
"required": true,
|
377
|
+
"description": "ID of the document to update",
|
378
|
+
"schema": {
|
379
|
+
"type": "string"
|
380
|
+
}
|
381
|
+
},
|
382
|
+
{
|
383
|
+
"name": "collection",
|
384
|
+
"summary": "Collection name",
|
385
|
+
"required": false,
|
386
|
+
"description": "Name of the collection in which to update the documents",
|
387
|
+
"schema": {
|
388
|
+
"type": "string"
|
389
|
+
}
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"name": "fields",
|
393
|
+
"summary": "Fields",
|
394
|
+
"required": true,
|
395
|
+
"description": "Fields to update",
|
396
|
+
"schema": {
|
397
|
+
"type": "object"
|
398
|
+
}
|
399
|
+
}
|
400
|
+
],
|
401
|
+
"x-events": []
|
402
|
+
}
|
312
403
|
}
|
313
404
|
},
|
314
405
|
"components": {
|