moeralib 0.16.6 → 0.16.8
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/lib/node/node.js +27 -5
- package/lib/node/validators.js +1493 -1293
- package/package.json +1 -1
- package/typings/node/node.d.ts +16 -1
- package/typings/node/node.d.ts.map +1 -1
- package/typings/node/types.d.ts +37 -1
- package/typings/node/types.d.ts.map +1 -1
- package/typings/node/validators.d.ts +7 -0
- package/typings/node/validators.d.ts.map +1 -1
package/lib/node/node.js
CHANGED
|
@@ -2256,15 +2256,37 @@ class MoeraNode extends caller_1.Caller {
|
|
|
2256
2256
|
* The returned nodes are sorted by their relevance. The exact definition of this term is left to the search
|
|
2257
2257
|
* engine's implementation.
|
|
2258
2258
|
*
|
|
2259
|
+
* @param {API.SearchNodeFilter} filter
|
|
2260
|
+
* @return {Promise<API.SearchNodePageInfo>}
|
|
2261
|
+
*/
|
|
2262
|
+
searchNodes(filter) {
|
|
2263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2264
|
+
const location = "/search/nodes";
|
|
2265
|
+
return yield this.call("searchNodes", location, {
|
|
2266
|
+
method: "POST", body: filter, schema: "SearchNodePageInfo"
|
|
2267
|
+
});
|
|
2268
|
+
});
|
|
2269
|
+
}
|
|
2270
|
+
/**
|
|
2271
|
+
* Search for Moera nodes matching the search ``query`` and return a short list of "smart suggestions" for the
|
|
2272
|
+
* user. Every space-delimited word in the query must match case-insensitively a beginning of the node's name or a
|
|
2273
|
+
* beginning of any non-letter-delimited word in the node's full name. The order of words is not significant. \
|
|
2274
|
+
* \
|
|
2275
|
+
* The search engine may decide to return fewer nodes than the given ``limit``. \
|
|
2276
|
+
* \
|
|
2277
|
+
* The returned nodes are sorted by their relevance. The exact definition of this term is left to the search
|
|
2278
|
+
* engine's implementation.
|
|
2279
|
+
*
|
|
2259
2280
|
* @param {string | null} query - the search query
|
|
2281
|
+
* @param {string | null} sheriff - filter out entries prohibited by the given sheriff
|
|
2260
2282
|
* @param {number | null} limit - maximum number of nodes returned
|
|
2261
2283
|
* @return {Promise<API.SearchNodeInfo[]>}
|
|
2262
2284
|
*/
|
|
2263
|
-
|
|
2264
|
-
return __awaiter(this, arguments, void 0, function* (query = null, limit = null) {
|
|
2265
|
-
const location = (0, util_1.ut) `/search/nodes`;
|
|
2266
|
-
const params = { query, limit };
|
|
2267
|
-
return yield this.call("
|
|
2285
|
+
searchNodeSuggestions() {
|
|
2286
|
+
return __awaiter(this, arguments, void 0, function* (query = null, sheriff = null, limit = null) {
|
|
2287
|
+
const location = (0, util_1.ut) `/search/nodes/suggestions`;
|
|
2288
|
+
const params = { query, sheriff, limit };
|
|
2289
|
+
return yield this.call("searchNodeSuggestions", location, {
|
|
2268
2290
|
method: "GET", params, schema: "SearchNodeInfoArray"
|
|
2269
2291
|
});
|
|
2270
2292
|
});
|