@rockcarver/frodo-lib 0.12.7 → 0.13.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/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.13.0] - 2022-10-04
11
+
12
+ ### Added
13
+
14
+ - \#110: Added `enableJourney` and `disableJourney` funtions to `JourneyOps.ts` in support of new `frodo-cli` commands `frodo journey enable` and `frodo journey disable`
15
+
16
+ ### Fixed
17
+
18
+ - \#109: Autonomous Access nodes are now properly classified as `premium` and `cloud`.
19
+
10
20
  ## [0.12.7] - 2022-10-02
11
21
 
12
22
  ### Changed
@@ -573,7 +583,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
573
583
  - Fixed problem with adding connection profiles
574
584
  - Miscellaneous bug fixes
575
585
 
576
- [Unreleased]: https://github.com/rockcarver/frodo-lib/compare/v0.12.7...HEAD
586
+ [Unreleased]: https://github.com/rockcarver/frodo-lib/compare/v0.13.0...HEAD
587
+
588
+ [0.13.0]: https://github.com/rockcarver/frodo-lib/compare/v0.12.7...v0.13.0
577
589
 
578
590
  [0.12.7]: https://github.com/rockcarver/frodo-lib/compare/v0.12.6...v0.12.7
579
591
 
@@ -8,6 +8,8 @@ exports.createMultiTreeExportTemplate = createMultiTreeExportTemplate;
8
8
  exports.createSingleTreeExportTemplate = createSingleTreeExportTemplate;
9
9
  exports.deleteJourney = deleteJourney;
10
10
  exports.deleteJourneys = deleteJourneys;
11
+ exports.disableJourney = disableJourney;
12
+ exports.enableJourney = enableJourney;
11
13
  exports.exportJourney = exportJourney;
12
14
  exports.exportJourneyToFile = exportJourneyToFile;
13
15
  exports.exportJourneysToFile = exportJourneysToFile;
@@ -1178,7 +1180,7 @@ function _importJourneyFromFile() {
1178
1180
  }
1179
1181
  });
1180
1182
 
1181
- return function (_x34, _x35) {
1183
+ return function (_x36, _x37) {
1182
1184
  return _ref4.apply(this, arguments);
1183
1185
  };
1184
1186
  }());
@@ -1258,7 +1260,7 @@ function _importFirstJourneyFromFile() {
1258
1260
 
1259
1261
  });
1260
1262
 
1261
- return function (_x36, _x37) {
1263
+ return function (_x38, _x39) {
1262
1264
  return _ref5.apply(this, arguments);
1263
1265
  };
1264
1266
  }());
@@ -1710,6 +1712,7 @@ function isCloudOnlyJourney(journey) {
1710
1712
  * - standard: can run on any instance of a ForgeRock platform
1711
1713
  * - cloud: utilize nodes, which are exclusively available in the ForgeRock Identity Cloud
1712
1714
  * - premium: utilizes nodes, which come at a premium
1715
+ * - custom: utilizes nodes not included in the ForgeRock platform release
1713
1716
  * @param {SingleTreeExportInterface} journey journey export data
1714
1717
  * @returns {JourneyClassification[]} an array of one or multiple classifications
1715
1718
  */
@@ -1933,7 +1936,7 @@ function _deleteJourney() {
1933
1936
  return status;
1934
1937
  });
1935
1938
 
1936
- return function (_x38) {
1939
+ return function (_x40) {
1937
1940
  return _ref6.apply(this, arguments);
1938
1941
  };
1939
1942
  }()).catch(error => {
@@ -1950,6 +1953,12 @@ function _deleteJourney() {
1950
1953
  function deleteJourneys(_x33) {
1951
1954
  return _deleteJourneys.apply(this, arguments);
1952
1955
  }
1956
+ /**
1957
+ * Enable a journey
1958
+ * @param journeyId journey id/name
1959
+ * @returns {Promise<boolean>} true if the operation was successful, false otherwise
1960
+ */
1961
+
1953
1962
 
1954
1963
  function _deleteJourneys() {
1955
1964
  _deleteJourneys = _asyncToGenerator(function* (options) {
@@ -1992,4 +2001,46 @@ function _deleteJourneys() {
1992
2001
  });
1993
2002
  return _deleteJourneys.apply(this, arguments);
1994
2003
  }
2004
+
2005
+ function enableJourney(_x34) {
2006
+ return _enableJourney.apply(this, arguments);
2007
+ }
2008
+ /**
2009
+ * Disable a journey
2010
+ * @param journeyId journey id/name
2011
+ * @returns {Promise<boolean>} true if the operation was successful, false otherwise
2012
+ */
2013
+
2014
+
2015
+ function _enableJourney() {
2016
+ _enableJourney = _asyncToGenerator(function* (journeyId) {
2017
+ try {
2018
+ var treeObject = yield (0, _TreeApi.getTree)(journeyId);
2019
+ treeObject['enabled'] = true;
2020
+ var newTreeObject = yield (0, _TreeApi.putTree)(journeyId, treeObject);
2021
+ return newTreeObject['enabled'] === true;
2022
+ } catch (error) {
2023
+ return false;
2024
+ }
2025
+ });
2026
+ return _enableJourney.apply(this, arguments);
2027
+ }
2028
+
2029
+ function disableJourney(_x35) {
2030
+ return _disableJourney.apply(this, arguments);
2031
+ }
2032
+
2033
+ function _disableJourney() {
2034
+ _disableJourney = _asyncToGenerator(function* (journeyId) {
2035
+ try {
2036
+ var treeObject = yield (0, _TreeApi.getTree)(journeyId);
2037
+ treeObject['enabled'] = false;
2038
+ var newTreeObject = yield (0, _TreeApi.putTree)(journeyId, treeObject);
2039
+ return newTreeObject['enabled'] === false;
2040
+ } catch (error) {
2041
+ return false;
2042
+ }
2043
+ });
2044
+ return _disableJourney.apply(this, arguments);
2045
+ }
1995
2046
  //# sourceMappingURL=JourneyOps.js.map