moeralib 0.16.5 → 0.16.6

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 CHANGED
@@ -40,6 +40,25 @@ class MoeraNode extends caller_1.Caller {
40
40
  });
41
41
  });
42
42
  }
43
+ /**
44
+ * Get a slice of the list of all orders sent by the sheriff, delimited by the ``before`` or ``after`` moment and
45
+ * the given ``limit``. If neither ``before`` nor ``after`` are provided, the latest orders are returned. The node
46
+ * may decide to return fewer orders than the given ``limit``. The orders are always sorted by moment, descending.
47
+ *
48
+ * @param {number | null} after - filter orders posted strongly after this moment
49
+ * @param {number | null} before - filter orders posted at or before this moment
50
+ * @param {number | null} limit - maximum number of orders returned
51
+ * @return {Promise<API.SheriffOrdersSliceInfo>}
52
+ */
53
+ getRemoteSheriffOrdersSlice() {
54
+ return __awaiter(this, arguments, void 0, function* (after = null, before = null, limit = null) {
55
+ const location = (0, util_1.ut) `/activity/sheriff/orders`;
56
+ const params = { after, before, limit };
57
+ return yield this.call("getRemoteSheriffOrdersSlice", location, {
58
+ method: "GET", params, schema: "SheriffOrdersSliceInfo"
59
+ });
60
+ });
61
+ }
43
62
  /**
44
63
  * Get the status of the asynchronous operation that performs verification of a remote posting signature.
45
64
  *
@@ -2250,6 +2269,45 @@ class MoeraNode extends caller_1.Caller {
2250
2269
  });
2251
2270
  });
2252
2271
  }
2272
+ /**
2273
+ * Search for postings and comments containing the specified hashtag(s) and optionally filtered by other criteria.
2274
+ * \
2275
+ * \
2276
+ * The search engine may decide to return fewer nodes than the given ``limit``. \
2277
+ * \
2278
+ * The returned entries are sorted by moment in descending order.
2279
+ *
2280
+ * @param {API.SearchHashtagFilter} filter
2281
+ * @return {Promise<API.SearchHashtagSliceInfo>}
2282
+ */
2283
+ searchEntriesByHashtag(filter) {
2284
+ return __awaiter(this, void 0, void 0, function* () {
2285
+ const location = "/search/entries/by-hashtag";
2286
+ return yield this.call("searchEntriesByHashtag", location, {
2287
+ method: "POST", body: filter, schema: "SearchHashtagSliceInfo", bodies: true
2288
+ });
2289
+ });
2290
+ }
2291
+ /**
2292
+ * Search for postings and comments containing the specified words or text fragment, and optionally filtered by
2293
+ * other criteria. \
2294
+ * \
2295
+ * The search engine may decide to return fewer nodes than the given ``limit``. \
2296
+ * \
2297
+ * The returned entries are sorted by their relevance. The exact definition of this term is left to the search
2298
+ * engine's implementation.
2299
+ *
2300
+ * @param {API.SearchTextFilter} filter
2301
+ * @return {Promise<API.SearchTextPageInfo>}
2302
+ */
2303
+ searchEntriesByText(filter) {
2304
+ return __awaiter(this, void 0, void 0, function* () {
2305
+ const location = "/search/entries/by-text";
2306
+ return yield this.call("searchEntriesByText", location, {
2307
+ method: "POST", body: filter, schema: "SearchTextPageInfo", bodies: true
2308
+ });
2309
+ });
2310
+ }
2253
2311
  /**
2254
2312
  * Update the given settings. If the input contains node settings, they are validated and the first validation
2255
2313
  * error is returned, if any. The update is always performed as a whole - if there is an error saving any one of