moeralib 0.15.5 → 0.16.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/lib/node/node.js CHANGED
@@ -1432,6 +1432,46 @@ class MoeraNode extends caller_1.Caller {
1432
1432
  });
1433
1433
  });
1434
1434
  }
1435
+ /**
1436
+ * Get the updating key mnemonic stored on the node.
1437
+ *
1438
+ * @return {Promise<API.KeyMnemonic>}
1439
+ */
1440
+ getStoredMnemonic() {
1441
+ return __awaiter(this, void 0, void 0, function* () {
1442
+ const location = "/node-name/mnemonic";
1443
+ return yield this.call("getStoredMnemonic", location, {
1444
+ method: "GET", schema: "KeyMnemonic"
1445
+ });
1446
+ });
1447
+ }
1448
+ /**
1449
+ * Store the updating key mnemonic on the node.
1450
+ *
1451
+ * @param {API.KeyMnemonic} mnemonic
1452
+ * @return {Promise<API.Result>}
1453
+ */
1454
+ storeMnemonic(mnemonic) {
1455
+ return __awaiter(this, void 0, void 0, function* () {
1456
+ const location = "/node-name/mnemonic";
1457
+ return yield this.call("storeMnemonic", location, {
1458
+ method: "POST", body: mnemonic, schema: "Result"
1459
+ });
1460
+ });
1461
+ }
1462
+ /**
1463
+ * Delete the updating key mnemonic stored on the node.
1464
+ *
1465
+ * @return {Promise<API.Result>}
1466
+ */
1467
+ deleteStoredMnemonic() {
1468
+ return __awaiter(this, void 0, void 0, function* () {
1469
+ const location = "/node-name/mnemonic";
1470
+ return yield this.call("deleteStoredMnemonic", location, {
1471
+ method: "DELETE", schema: "Result"
1472
+ });
1473
+ });
1474
+ }
1435
1475
  /**
1436
1476
  * Accept a notification packet from another node. Notification packets older than 10 minutes are ignored. The
1437
1477
  * sending node should update the packet timestamp and the signature and send the packet again. This mechanism
@@ -2387,6 +2427,20 @@ class MoeraNode extends caller_1.Caller {
2387
2427
  });
2388
2428
  });
2389
2429
  }
2430
+ /**
2431
+ * Delete the story.
2432
+ *
2433
+ * @param {string} id - ID of the story
2434
+ * @return {Promise<API.Result>}
2435
+ */
2436
+ deleteStory(id) {
2437
+ return __awaiter(this, void 0, void 0, function* () {
2438
+ const location = (0, util_1.ut) `/stories/${id}`;
2439
+ return yield this.call("deleteStory", location, {
2440
+ method: "DELETE", schema: "Result"
2441
+ });
2442
+ });
2443
+ }
2390
2444
  /**
2391
2445
  * Get the list of all subscribers, optionally filtered by some criteria.
2392
2446
  *