@rockcarver/frodo-lib 2.0.0-70 → 2.0.0-71

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.
Files changed (217) hide show
  1. package/build.zip +0 -0
  2. package/cjs/ops/JourneyOps.test.js +1 -1
  3. package/cjs/ops/JourneyOps.test.js.map +1 -1
  4. package/cjs/ops/NodeOps.js +122 -9
  5. package/cjs/ops/NodeOps.js.map +1 -1
  6. package/cjs/ops/NodeOps.test.js +370 -0
  7. package/cjs/ops/NodeOps.test.js.map +1 -0
  8. package/docs/assets/search.js +1 -1
  9. package/docs/index.html +2 -2
  10. package/docs/interfaces/Reference.AdminFederationExportInterface.html +2 -2
  11. package/docs/interfaces/Reference.AgentExportInterface.html +2 -2
  12. package/docs/interfaces/Reference.ApplicationExportInterface.html +9 -9
  13. package/docs/interfaces/Reference.AuthenticationSettingsExportInterface.html +2 -2
  14. package/docs/interfaces/Reference.CirclesOfTrustExportInterface.html +2 -2
  15. package/docs/interfaces/Reference.ConfigEntityExportInterface.html +2 -2
  16. package/docs/interfaces/Reference.ConfigEntityImportOptions.html +3 -3
  17. package/docs/interfaces/Reference.ConnectionProfileInterface.html +2 -2
  18. package/docs/interfaces/Reference.ConnectionsFileInterface.html +1 -1
  19. package/docs/interfaces/Reference.ConnectorExportInterface.html +2 -2
  20. package/docs/interfaces/Reference.ConnectorExportOptions.html +4 -4
  21. package/docs/interfaces/Reference.ConnectorImportOptions.html +3 -3
  22. package/docs/interfaces/Reference.ConnectorServerStatusInterface.html +2 -2
  23. package/docs/interfaces/Reference.EmailTemplateExportInterface.html +2 -2
  24. package/docs/interfaces/Reference.EnvInfoInterface.html +2 -2
  25. package/docs/interfaces/Reference.ExportMetaData.html +2 -2
  26. package/docs/interfaces/Reference.FeatureInterface.html +2 -2
  27. package/docs/interfaces/Reference.FullExportInterface.html +2 -2
  28. package/docs/interfaces/Reference.FullExportOptions.html +6 -6
  29. package/docs/interfaces/Reference.FullImportOptions.html +8 -8
  30. package/docs/interfaces/Reference.FullService.html +2 -2
  31. package/docs/interfaces/Reference.IdObjectSkeletonInterface.html +2 -2
  32. package/docs/interfaces/Reference.InnerNodeRefSkeletonInterface.html +2 -2
  33. package/docs/interfaces/Reference.JwkInterface.html +2 -2
  34. package/docs/interfaces/Reference.JwksInterface.html +2 -2
  35. package/docs/interfaces/Reference.ManagedObjectPatchOperationInterface.html +3 -3
  36. package/docs/interfaces/Reference.MappingExportInterface.html +2 -2
  37. package/docs/interfaces/Reference.MappingImportOptions.html +3 -3
  38. package/docs/interfaces/Reference.MultiTreeExportInterface.html +2 -2
  39. package/docs/interfaces/Reference.NoIdObjectSkeletonInterface.html +2 -2
  40. package/docs/interfaces/Reference.NodeRefSkeletonInterface.html +2 -2
  41. package/docs/interfaces/Reference.OAuth2ClientExportInterface.html +2 -2
  42. package/docs/interfaces/Reference.OAuth2ClientExportOptions.html +4 -4
  43. package/docs/interfaces/Reference.OAuth2ClientImportOptions.html +3 -3
  44. package/docs/interfaces/Reference.OAuth2TrustedJwtIssuerExportInterface.html +2 -2
  45. package/docs/interfaces/Reference.OAuth2TrustedJwtIssuerExportOptions.html +4 -4
  46. package/docs/interfaces/Reference.OAuth2TrustedJwtIssuerImportOptions.html +3 -3
  47. package/docs/interfaces/Reference.PlatformInfoInterface.html +2 -2
  48. package/docs/interfaces/Reference.PolicyExportInterface.html +2 -2
  49. package/docs/interfaces/Reference.PolicyExportOptions.html +5 -5
  50. package/docs/interfaces/Reference.PolicyImportOptions.html +5 -5
  51. package/docs/interfaces/Reference.PolicySetExportInterface.html +2 -2
  52. package/docs/interfaces/Reference.PolicySetExportOptions.html +5 -5
  53. package/docs/interfaces/Reference.PolicySetImportOptions.html +4 -4
  54. package/docs/interfaces/Reference.ResourceTypeExportInterface.html +2 -2
  55. package/docs/interfaces/Reference.Saml2EntitiesExportOptions.html +2 -2
  56. package/docs/interfaces/Reference.Saml2EntitiesImportOptions.html +2 -2
  57. package/docs/interfaces/Reference.Saml2ExportInterface.html +2 -2
  58. package/docs/interfaces/Reference.ScriptExportInterface.html +2 -2
  59. package/docs/interfaces/Reference.ScriptImportOptions.html +4 -4
  60. package/docs/interfaces/Reference.SecretsExportInterface.html +2 -2
  61. package/docs/interfaces/Reference.SecureConnectionProfileInterface.html +2 -2
  62. package/docs/interfaces/Reference.ServiceExportInterface.html +2 -2
  63. package/docs/interfaces/Reference.ServiceImportOptions.html +5 -5
  64. package/docs/interfaces/Reference.ServiceListItem.html +4 -4
  65. package/docs/interfaces/Reference.ServiceNextDescendent.html +1 -1
  66. package/docs/interfaces/Reference.SingleTreeExportInterface.html +2 -2
  67. package/docs/interfaces/Reference.SocialIdentityProviderImportOptions.html +3 -3
  68. package/docs/interfaces/Reference.SocialProviderExportInterface.html +2 -2
  69. package/docs/interfaces/Reference.StateInterface.html +2 -2
  70. package/docs/interfaces/Reference.SystemObjectPatchOperationInterface.html +2 -2
  71. package/docs/interfaces/Reference.SystemStatusInterface.html +2 -2
  72. package/docs/interfaces/Reference.ThemeExportInterface.html +2 -2
  73. package/docs/interfaces/Reference.TokenCacheInterface.html +1 -1
  74. package/docs/interfaces/Reference.TreeDependencyMapInterface.html +1 -1
  75. package/docs/interfaces/Reference.TreeExportOptions.html +5 -5
  76. package/docs/interfaces/Reference.TreeExportResolverInterface.html +1 -1
  77. package/docs/interfaces/Reference.TreeImportOptions.html +4 -4
  78. package/docs/interfaces/Reference.UiConfigInterface.html +2 -2
  79. package/docs/interfaces/Reference.Updates.html +4 -4
  80. package/docs/interfaces/Reference.VariablesExportInterface.html +2 -2
  81. package/docs/modules/Reference.html +2 -2
  82. package/docs/modules.html +2 -2
  83. package/docs/types/Reference.AccessTokenMetaType.html +1 -1
  84. package/docs/types/Reference.AccessTokenResponseType.html +1 -1
  85. package/docs/types/Reference.Admin.html +1 -1
  86. package/docs/types/Reference.AdminFederation.html +15 -15
  87. package/docs/types/Reference.AdminFederationConfigSkeleton.html +1 -1
  88. package/docs/types/Reference.Agent.html +53 -53
  89. package/docs/types/Reference.AgentSkeleton.html +1 -1
  90. package/docs/types/Reference.AgentType.html +1 -1
  91. package/docs/types/Reference.AmServiceSkeleton.html +1 -1
  92. package/docs/types/Reference.AmServiceType.html +1 -1
  93. package/docs/types/Reference.Application.html +19 -19
  94. package/docs/types/Reference.ApplicationExportOptions.html +2 -2
  95. package/docs/types/Reference.ApplicationImportOptions.html +2 -2
  96. package/docs/types/Reference.ApplicationSkeleton.html +1 -1
  97. package/docs/types/Reference.Authenticate.html +3 -3
  98. package/docs/types/Reference.AuthenticationSettings.html +5 -5
  99. package/docs/types/Reference.AuthenticationSettingsSkeleton.html +1 -1
  100. package/docs/types/Reference.Base64.html +1 -1
  101. package/docs/types/Reference.CircleOfTrustSkeleton.html +1 -1
  102. package/docs/types/Reference.CirclesOfTrust.html +15 -15
  103. package/docs/types/Reference.Config.html +3 -3
  104. package/docs/types/Reference.ConnectionProfile.html +9 -9
  105. package/docs/types/Reference.Connector.html +13 -13
  106. package/docs/types/Reference.ConnectorSkeleton.html +1 -1
  107. package/docs/types/Reference.Constants.html +1 -1
  108. package/docs/types/Reference.DeleteJourneyStatus.html +1 -1
  109. package/docs/types/Reference.DeleteJourneysStatus.html +1 -1
  110. package/docs/types/Reference.EmailTemplate.html +13 -13
  111. package/docs/types/Reference.EmailTemplateSkeleton.html +1 -1
  112. package/docs/types/Reference.ExportImport.html +7 -7
  113. package/docs/types/Reference.FRUtils.html +1 -1
  114. package/docs/types/Reference.Feature.html +3 -3
  115. package/docs/types/Reference.Frodo.html +4 -4
  116. package/docs/types/Reference.GatewayAgentType.html +1 -1
  117. package/docs/types/Reference.IdmConfig.html +18 -18
  118. package/docs/types/Reference.IdmConfigStub.html +1 -1
  119. package/docs/types/Reference.IdmSystem.html +14 -14
  120. package/docs/types/Reference.Idp.html +21 -21
  121. package/docs/types/Reference.Info.html +2 -2
  122. package/docs/types/Reference.JavaAgentType.html +1 -1
  123. package/docs/types/Reference.Jose.html +1 -1
  124. package/docs/types/Reference.Journey.html +28 -28
  125. package/docs/types/Reference.JourneyClassificationType.html +1 -1
  126. package/docs/types/Reference.Json.html +7 -7
  127. package/docs/types/Reference.JwkRsa.html +1 -1
  128. package/docs/types/Reference.JwkRsaPublic.html +1 -1
  129. package/docs/types/Reference.Log.html +13 -13
  130. package/docs/types/Reference.LogApiKey.html +1 -1
  131. package/docs/types/Reference.LogEventPayloadSkeleton.html +1 -1
  132. package/docs/types/Reference.LogEventSkeleton.html +1 -1
  133. package/docs/types/Reference.ManagedObject.html +11 -11
  134. package/docs/types/Reference.Mapping.html +15 -15
  135. package/docs/types/Reference.MappingPolicy.html +1 -1
  136. package/docs/types/Reference.MappingProperty.html +1 -1
  137. package/docs/types/Reference.MappingSkeleton.html +1 -1
  138. package/docs/types/Reference.Node.html +20 -14
  139. package/docs/types/Reference.NodeClassificationType.html +1 -1
  140. package/docs/types/Reference.NodeSkeleton.html +1 -1
  141. package/docs/types/Reference.OAuth2Client.html +16 -16
  142. package/docs/types/Reference.OAuth2ClientSkeleton.html +1 -1
  143. package/docs/types/Reference.OAuth2Oidc.html +1 -1
  144. package/docs/types/Reference.OAuth2Provider.html +6 -6
  145. package/docs/types/Reference.OAuth2ProviderSkeleton.html +1 -1
  146. package/docs/types/Reference.OAuth2TrustedJwtIssuer.html +16 -16
  147. package/docs/types/Reference.OAuth2TrustedJwtIssuerSkeleton.html +1 -1
  148. package/docs/types/Reference.ObjectPropertyFlag.html +1 -1
  149. package/docs/types/Reference.ObjectPropertyNativeType.html +1 -1
  150. package/docs/types/Reference.ObjectPropertySkeleton.html +1 -1
  151. package/docs/types/Reference.ObjectPropertyType.html +1 -1
  152. package/docs/types/Reference.ObjectTypeSkeleton.html +1 -1
  153. package/docs/types/Reference.Organization.html +4 -4
  154. package/docs/types/Reference.PagedResult.html +1 -1
  155. package/docs/types/Reference.PlatformInfo.html +1 -1
  156. package/docs/types/Reference.Policy.html +18 -18
  157. package/docs/types/Reference.PolicyCondition.html +1 -1
  158. package/docs/types/Reference.PolicyConditionType.html +1 -1
  159. package/docs/types/Reference.PolicySet.html +11 -11
  160. package/docs/types/Reference.PolicySetSkeleton.html +1 -1
  161. package/docs/types/Reference.PolicySkeleton.html +1 -1
  162. package/docs/types/Reference.ProgressIndicatorStatusType.html +1 -1
  163. package/docs/types/Reference.ProgressIndicatorType.html +1 -1
  164. package/docs/types/Reference.Readable.html +1 -1
  165. package/docs/types/Reference.Realm.html +13 -13
  166. package/docs/types/Reference.RealmSkeleton.html +1 -1
  167. package/docs/types/Reference.Recon.html +6 -6
  168. package/docs/types/Reference.ReconStatusType.html +1 -1
  169. package/docs/types/Reference.ReconType.html +1 -1
  170. package/docs/types/Reference.ResourceType.html +18 -18
  171. package/docs/types/Reference.ResourceTypeSkeleton.html +1 -1
  172. package/docs/types/Reference.Saml2.html +19 -19
  173. package/docs/types/Reference.Saml2ProiderLocation.html +1 -1
  174. package/docs/types/Reference.Saml2ProviderSkeleton.html +1 -1
  175. package/docs/types/Reference.Saml2ProviderStub.html +1 -1
  176. package/docs/types/Reference.Script.html +18 -18
  177. package/docs/types/Reference.ScriptContext.html +1 -1
  178. package/docs/types/Reference.ScriptLanguage.html +1 -1
  179. package/docs/types/Reference.ScriptSkeleton.html +1 -1
  180. package/docs/types/Reference.ScriptValidation.html +1 -1
  181. package/docs/types/Reference.Secret.html +22 -22
  182. package/docs/types/Reference.SecretEncodingType.html +2 -2
  183. package/docs/types/Reference.SecretSkeleton.html +2 -2
  184. package/docs/types/Reference.Service.html +9 -9
  185. package/docs/types/Reference.ServiceAccount.html +4 -4
  186. package/docs/types/Reference.ServiceAccountType.html +1 -1
  187. package/docs/types/Reference.Session.html +2 -2
  188. package/docs/types/Reference.SessionInfoType.html +1 -1
  189. package/docs/types/Reference.SocialIdpSkeleton.html +1 -1
  190. package/docs/types/Reference.Startup.html +3 -3
  191. package/docs/types/Reference.State.html +7 -7
  192. package/docs/types/Reference.Theme.html +20 -20
  193. package/docs/types/Reference.ThemeSkeleton.html +1 -1
  194. package/docs/types/Reference.TokenCache.html +16 -16
  195. package/docs/types/Reference.TokenInfoResponseType.html +1 -1
  196. package/docs/types/Reference.TreeSkeleton.html +1 -1
  197. package/docs/types/Reference.UserSessionMetaType.html +1 -1
  198. package/docs/types/Reference.Variable.html +13 -13
  199. package/docs/types/Reference.VariableExpressionType.html +2 -2
  200. package/docs/types/Reference.VariableSkeleton.html +2 -2
  201. package/docs/types/Reference.Version.html +1 -1
  202. package/docs/types/Reference.VersionOfSecretSkeleton.html +2 -2
  203. package/docs/types/Reference.VersionOfSecretStatus.html +1 -1
  204. package/docs/types/Reference.WebAgentType.html +1 -1
  205. package/docs/types/Reference.Writable.html +1 -1
  206. package/docs/types/Reference.tokenType.html +1 -1
  207. package/docs/variables/frodo.html +2 -2
  208. package/docs/variables/state.html +2 -2
  209. package/esm/ops/JourneyOps.test.js +1 -1
  210. package/esm/ops/JourneyOps.test.js.map +1 -1
  211. package/esm/ops/NodeOps.js +113 -5
  212. package/esm/ops/NodeOps.js.map +1 -1
  213. package/esm/ops/NodeOps.test.js +364 -0
  214. package/esm/ops/NodeOps.test.js.map +1 -0
  215. package/package.json +1 -1
  216. package/types/ops/NodeOps.d.ts +36 -4
  217. package/types/ops/NodeOps.d.ts.map +1 -1
package/build.zip CHANGED
Binary file
@@ -204,7 +204,7 @@ describe('JourneyOps', () => {
204
204
  state: _index.state
205
205
  });
206
206
  //Ignore the _rev field
207
- serverTree._rev = journey.tree._rev;
207
+ if (serverTree) serverTree._rev = journey.tree._rev;
208
208
  expect(serverTree).toStrictEqual(journey.tree);
209
209
  expect(tree).toMatchSnapshot(journey.tree);
210
210
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"JourneyOps.test.js","names":["ctx","autoSetupPolly","state","setDeploymentType","Constants","CLOUD_DEPLOYMENT_TYPE_KEY","stageJourney","_x","_stageJourney","apply","arguments","_asyncToGenerator","journey","create","length","undefined","JourneyOps","readJourney","journeyId","id","deleteJourney","options","deep","verbose","progress","error","importJourney","importData","getJourney","reUuid","deps","describe","journey1","journey2","journey3","journey4","journey5","journey6","journey7","journey8","journey9","journey10","journey10NoCoords","journey11","beforeAll","process","env","FRODO_POLLY_MODE","afterAll","beforeEach","polly","server","any","on","_req","recording","filterRecording","FRODO_RECORD_PHASE","test","expect","updateCoordinates","toBeDefined","tree","JSON","parse","stringify","nodesAttributeName","serverTree","toBeNull","toMatchSnapshot","nodes","node1","x","node2","y","_rev","toStrictEqual","expectedTree","node5","node6","journeyNoCoords","staticNodes","node3","node4","readJourneys","journeys","exportJourney","concat","response","useStringArrays","coords","meta","Object","exportJourneys","journeyExport","assertions","toBeTruthy","enableJourney","result","disableJourney"],"sources":["../../src/ops/JourneyOps.test.ts"],"sourcesContent":["/**\n * To record and update snapshots, you must perform 3 steps in order:\n *\n * 1. Record API responses & update ESM snapshots\n *\n * This step breaks down into 4 phases:\n *\n * Phase 1: Record Non-destructive tests\n * Phase 2: Record Group 1 of DESTRUCTIVE tests - Deletes by ID\n * Phase 3: Record Group 2 of DESTRUCTIVE tests - Deletes by tag\n * Phase 4: Record Group 3 of DESTRUCTIVE tests - Delete all\n *\n * Because destructive tests interfere with the recording of non-destructive\n * tests and also interfere among themselves, they have to be run in groups\n * of non-interfering tests.\n *\n * To record and update ESM snapshots, you must call the test:record\n * script and override all the connection state variables required\n * to connect to the env to record from and also indicate the phase:\n *\n * FRODO_DEBUG=1 FRODO_RECORD_PHASE=1 FRODO_HOST=frodo-dev npm run test:record JourneyOps\n *\n * THESE TESTS ARE DESTRUCTIVE!!! DO NOT RUN AGAINST AN ENV WITH ACTIVE JOURNEYS!!!\n *\n * FRODO_DEBUG=1 FRODO_RECORD_PHASE=2 FRODO_HOST=frodo-dev npm run test:record JourneyOps\n * FRODO_DEBUG=1 FRODO_RECORD_PHASE=3 FRODO_HOST=frodo-dev npm run test:record JourneyOps\n * FRODO_DEBUG=1 FRODO_RECORD_PHASE=4 FRODO_HOST=frodo-dev npm run test:record JourneyOps\n *\n * The above command assumes that you have a connection profile for\n * 'frodo-dev' on your development machine.\n *\n * 2. Update CJS snapshots\n *\n * After recording, the ESM snapshots will already be updated as that happens\n * in one go, but you must manually update the CJS snapshots by running:\n *\n * FRODO_DEBUG=1 npm run test:update JourneyOps\n *\n * 3. Test your changes\n *\n * If 1 and 2 didn't produce any errors, you are ready to run the tests in\n * replay mode and make sure they all succeed as well:\n *\n * npm run test:only JourneyOps\n *\n * Note: FRODO_DEBUG=1 is optional and enables debug logging for some output\n * in case things don't function as expected\n */\nimport { state } from '../index';\nimport * as JourneyOps from './JourneyOps';\nimport { getJourney } from '../test/mocks/ForgeRockApiMockEngine';\nimport { autoSetupPolly, filterRecording } from '../utils/AutoSetupPolly';\nimport Constants from '../shared/Constants';\n\nconst ctx = autoSetupPolly();\n\nstate.setDeploymentType(Constants.CLOUD_DEPLOYMENT_TYPE_KEY);\n\nasync function stageJourney(journey: { id: string }, create = true) {\n // delete if exists, then create\n try {\n await JourneyOps.readJourney({ journeyId: journey.id, state });\n await JourneyOps.deleteJourney({\n journeyId: journey.id,\n options: {\n deep: true,\n verbose: false,\n progress: false,\n },\n state,\n });\n } catch (error) {\n // ignore\n } finally {\n if (create) {\n await JourneyOps.importJourney({\n importData: getJourney(journey.id),\n options: {\n reUuid: false,\n deps: true,\n },\n state,\n });\n }\n }\n}\n\ndescribe('JourneyOps', () => {\n const journey1 = {\n id: 'FrodoTestJourney1',\n };\n const journey2 = {\n id: 'FrodoTestJourney2',\n };\n const journey3 = {\n id: 'FrodoTestJourney3',\n };\n const journey4 = {\n id: 'FrodoTestJourney4',\n };\n const journey5 = {\n id: 'FrodoTestJourney5',\n };\n const journey6 = {\n id: 'FrodoTestJourney6',\n };\n const journey7 = {\n id: 'FrodoTestJourney7',\n };\n const journey8 = {\n id: 'FrodoTestJourney8',\n };\n const journey9 = {\n id: 'FrodoTestJourney9',\n };\n const journey10 = {\n id: 'FrodoTestJourney10',\n };\n const journey10NoCoords = {\n id: 'FrodoTestJourney10NoCoords'\n };\n const journey11 = {\n id: 'FrodoTestJourney11',\n }\n // in recording mode, setup test data before recording\n beforeAll(async () => {\n if (process.env.FRODO_POLLY_MODE === 'record') {\n await stageJourney(journey1);\n await stageJourney(journey2);\n await stageJourney(journey3);\n await stageJourney(journey4, false);\n await stageJourney(journey5, false);\n await stageJourney(journey6);\n await stageJourney(journey7);\n await stageJourney(journey8);\n await stageJourney(journey9);\n await stageJourney(journey10);\n await stageJourney(journey10NoCoords, false);\n await stageJourney(journey11, false);\n }\n });\n // in recording mode, remove test data after recording\n afterAll(async () => {\n if (process.env.FRODO_POLLY_MODE === 'record') {\n await stageJourney(journey1, false);\n await stageJourney(journey2, false);\n await stageJourney(journey3, false);\n await stageJourney(journey4, false);\n await stageJourney(journey5, false);\n await stageJourney(journey6, false);\n await stageJourney(journey7, false);\n await stageJourney(journey8, false);\n await stageJourney(journey9, false);\n await stageJourney(journey10, false);\n await stageJourney(journey10NoCoords, false);\n await stageJourney(journey11, false);\n }\n });\n beforeEach(async () => {\n if (process.env.FRODO_POLLY_MODE === 'record') {\n ctx.polly.server.any().on('beforePersist', (_req, recording) => {\n filterRecording(recording);\n });\n }\n });\n // Phase 1\n if (\n !process.env.FRODO_POLLY_MODE ||\n (process.env.FRODO_POLLY_MODE === 'record' &&\n process.env.FRODO_RECORD_PHASE === '1')\n ) {\n describe('updateCoordinates()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.updateCoordinates).toBeDefined();\n });\n\n test('1: Nothing changes when coordinates exist', async () => {\n const journey = getJourney(journey10.id);\n const tree = JSON.parse(JSON.stringify(journey.tree));\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: null,\n state\n })).toBeNull();\n expect(tree).toMatchSnapshot(journey.tree);\n });\n\n test('2: Update coordinates with server coordinates when server tree exists', async () => {\n const journey = getJourney(journey10.id);\n const tree = JSON.parse(JSON.stringify(journey.tree));\n delete tree.nodes.node1.x;\n delete tree.nodes.node2.y;\n const serverTree = await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: null,\n state\n });\n //Ignore the _rev field\n serverTree._rev = journey.tree._rev;\n expect(serverTree).toStrictEqual(journey.tree);\n expect(tree).toMatchSnapshot(journey.tree);\n });\n\n test('3: Updates coordinates to 0 if serverTree does not exist', async () => {\n const journey = getJourney(journey11.id);\n const expectedTree = JSON.parse(JSON.stringify(journey.tree));\n expectedTree.nodes.node5.x = 0;\n expectedTree.nodes.node5.y = 0;\n expectedTree.nodes.node6.x = 0;\n expectedTree.nodes.node6.y = 0;\n const tree = JSON.parse(JSON.stringify(journey.tree));\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: null,\n state\n })).toBeNull();\n expect(tree).toMatchSnapshot(expectedTree);\n });\n\n test('4: Updates coordinates to 0 if serverTree nodes do not exist', async () => {\n const journey = getJourney(journey10NoCoords.id);\n const expectedTree = JSON.parse(JSON.stringify(journey.tree));\n expectedTree.nodes.node1.x = 0;\n expectedTree.nodes.node1.y = 0;\n expectedTree.nodes.node2.x = 0;\n expectedTree.nodes.node2.y = 0;\n const serverTree = JSON.parse(JSON.stringify(journey.tree));\n delete serverTree.nodes;\n const tree = JSON.parse(JSON.stringify(journey.tree));\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: serverTree,\n state\n })).toStrictEqual(serverTree);\n expect(tree).toStrictEqual(expectedTree);\n });\n\n test('5: Updates coordinates in various cases', async () => {\n const journey = getJourney(journey10.id);\n const journeyNoCoords = getJourney(journey10NoCoords.id);\n const expectedTree = JSON.parse(JSON.stringify(journey.tree));\n expectedTree.nodes.node1.x = 0;\n expectedTree.nodes.node2.y = 0;\n expectedTree.nodes.node2.x = 1001;\n expectedTree.staticNodes.node3.y = 0;\n expectedTree.staticNodes.node4.x = 0;\n expectedTree.staticNodes.node4.y = 1002;\n const serverTree = JSON.parse(JSON.stringify(journey.tree));\n delete serverTree.nodes.node1.x;\n delete serverTree.nodes.node2.y;\n delete serverTree.staticNodes.node3.y;\n delete serverTree.staticNodes.node4.x;\n const tree = JSON.parse(JSON.stringify(journeyNoCoords.tree));\n tree.nodes.node2.x = 1001;\n tree.staticNodes.node4.y = 1002;\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: serverTree,\n state\n })).toStrictEqual(serverTree);\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"staticNodes\",\n serverTree: serverTree,\n state\n })).toStrictEqual(serverTree);\n expect(tree).toStrictEqual(expectedTree);\n });\n });\n\n describe('getJourneys()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.readJourneys).toBeDefined();\n });\n\n test('1: Get all journeys', async () => {\n const journeys = await JourneyOps.readJourneys({ state });\n expect(journeys).toMatchSnapshot();\n });\n });\n\n describe('exportJourney()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.exportJourney).toBeDefined();\n });\n\n test(`1: Export journey '${journey3.id}' w/o dependencies`, async () => {\n const response = await JourneyOps.exportJourney({\n journeyId: journey3.id,\n options: {\n useStringArrays: false,\n deps: false,\n coords: true,\n },\n state,\n });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n\n test(`2: Export journey '${journey3.id}' w/ dependencies`, async () => {\n const response = await JourneyOps.exportJourney({\n journeyId: journey3.id,\n options: {\n useStringArrays: false,\n deps: true,\n coords: true,\n },\n state,\n });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n\n test(`3: Export journey '${journey3.id}' w/ dependencies and w/o coordinates`, async () => {\n const response = await JourneyOps.exportJourney({\n journeyId: journey3.id,\n options: {\n useStringArrays: false,\n deps: true,\n coords: false,\n },\n state,\n });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n });\n\n describe('exportJourneys()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.exportJourneys).toBeDefined();\n });\n\n test('1: Export journeys w/o dependencies', async () => {\n const response = await JourneyOps.exportJourneys({ options: { deps: false, useStringArrays: true, coords: true }, state });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n\n test('1: Export journeys w/ dependencies', async () => {\n const response = await JourneyOps.exportJourneys({ options: { deps: true, useStringArrays: true, coords: true }, state });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n\n test('1: Export journeys w/ dependencies and w/o coordinates', async () => {\n const response = await JourneyOps.exportJourneys({ options: { deps: true, useStringArrays: true, coords: false }, state });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n });\n\n describe('importJourney()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.importJourney).toBeDefined();\n });\n\n test(`1: Import journey '${journey4.id}' w/o dependencies`, async () => {\n const journeyExport = getJourney(journey4.id);\n expect.assertions(1);\n const response = await JourneyOps.importJourney({\n importData: journeyExport,\n options: {\n reUuid: false,\n deps: false,\n },\n state,\n });\n expect(response).toBeTruthy();\n });\n\n test(`2: Import journey '${journey5.id}' w/ dependencies`, async () => {\n const journeyExport = getJourney(journey5.id);\n expect.assertions(1);\n const response = await JourneyOps.importJourney({\n importData: journeyExport,\n options: {\n reUuid: false,\n deps: true,\n },\n state,\n });\n expect(response).toBeTruthy();\n });\n });\n\n describe('enableJourney()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.enableJourney).toBeDefined();\n });\n\n test(`1: Enable disabled journey '${journey6.id}'`, async () => {\n expect.assertions(1);\n const result = await JourneyOps.enableJourney({\n journeyId: journey6.id,\n state,\n });\n expect(result).toBeTruthy();\n });\n\n test(`2: Enable already enabled journey '${journey7.id}'`, async () => {\n expect.assertions(1);\n const result = await JourneyOps.enableJourney({\n journeyId: journey7.id,\n state,\n });\n expect(result).toBeTruthy();\n });\n });\n\n describe('disableJourney()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.disableJourney).toBeDefined();\n });\n\n test(`1: Disable enabled journey '${journey8.id}'`, async () => {\n expect.assertions(1);\n const result = await JourneyOps.disableJourney({\n journeyId: journey8.id,\n state,\n });\n expect(result).toBeTruthy();\n });\n\n test(`2: Disable already disabled journey '${journey9.id}'`, async () => {\n expect.assertions(1);\n const result = await JourneyOps.disableJourney({\n journeyId: journey9.id,\n state,\n });\n expect(result).toBeTruthy();\n });\n });\n }\n});\n"],"mappings":";;;;;;;;;;;sYAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA,IAAMA,GAAG,GAAG,IAAAC,8BAAc,EAAC,CAAC;AAE5BC,YAAK,CAACC,iBAAiB,CAACC,kBAAS,CAACC,yBAAyB,CAAC;AAAC,SAE9CC,YAAYA,CAAAC,EAAA;EAAA,OAAAC,aAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,cAAA;EAAAA,aAAA,GAAAG,iBAAA,CAA3B,WAA4BC,OAAuB,EAAiB;IAAA,IAAfC,MAAM,GAAAH,SAAA,CAAAI,MAAA,QAAAJ,SAAA,QAAAK,SAAA,GAAAL,SAAA,MAAG,IAAI;IAChE;IACA,IAAI;MACF,MAAMM,UAAU,CAACC,WAAW,CAAC;QAAEC,SAAS,EAAEN,OAAO,CAACO,EAAE;QAAEjB,KAAK,EAALA;MAAM,CAAC,CAAC;MAC9D,MAAMc,UAAU,CAACI,aAAa,CAAC;QAC7BF,SAAS,EAAEN,OAAO,CAACO,EAAE;QACrBE,OAAO,EAAE;UACPC,IAAI,EAAE,IAAI;UACVC,OAAO,EAAE,KAAK;UACdC,QAAQ,EAAE;QACZ,CAAC;QACDtB,KAAK,EAALA;MACF,CAAC,CAAC;IACJ,CAAC,CA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AACnB,EAAE;UACtBjB,KAAK,EAALA;QACF,CAAC,CAAC;QACFyD,MAAM,CAACuC,MAAM,CAAC,CAACF,UAAU,CAAC,CAAC;MAC7B,CAAC,EAAC;IACJ,CAAC,CAAC;IAEFjE,QAAQ,CAAC,kBAAkB,EAAE,MAAM;MACjC2B,IAAI,CAAC,0BAA0B,eAAA/C,iBAAA,CAAE,aAAY;QAC3CgD,MAAM,CAAC3C,UAAU,CAACmF,cAAc,CAAC,CAACtC,WAAW,CAAC,CAAC;MACjD,CAAC,EAAC;MAEFH,IAAI,gCAAA6B,MAAA,CAAgChD,QAAQ,CAACpB,EAAE,qBAAAR,iBAAA,CAAK,aAAY;QAC9DgD,MAAM,CAACoC,UAAU,CAAC,CAAC,CAAC;QACpB,IAAMG,MAAM,SAASlF,UAAU,CAACmF,cAAc,CAAC;UAC7CjF,SAAS,EAAEqB,QAAQ,CAACpB,EAAE;UACtBjB,KAAK,EAALA;QACF,CAAC,CAAC;QACFyD,MAAM,CAACuC,MAAM,CAAC,CAACF,UAAU,CAAC,CAAC;MAC7B,CAAC,EAAC;MAEFtC,IAAI,yCAAA6B,MAAA,CAAyC/C,QAAQ,CAACrB,EAAE,qBAAAR,iBAAA,CAAK,aAAY;QACvEgD,MAAM,CAACoC,UAAU,CAAC,CAAC,CAAC;QACpB,IAAMG,MAAM,SAASlF,UAAU,CAACmF,cAAc,CAAC;UAC7CjF,SAAS,EAAEsB,QAAQ,CAACrB,EAAE;UACtBjB,KAAK,EAALA;QACF,CAAC,CAAC;QACFyD,MAAM,CAACuC,MAAM,CAAC,CAACF,UAAU,CAAC,CAAC;MAC7B,CAAC,EAAC;IACJ,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"JourneyOps.test.js","names":["ctx","autoSetupPolly","state","setDeploymentType","Constants","CLOUD_DEPLOYMENT_TYPE_KEY","stageJourney","_x","_stageJourney","apply","arguments","_asyncToGenerator","journey","create","length","undefined","JourneyOps","readJourney","journeyId","id","deleteJourney","options","deep","verbose","progress","error","importJourney","importData","getJourney","reUuid","deps","describe","journey1","journey2","journey3","journey4","journey5","journey6","journey7","journey8","journey9","journey10","journey10NoCoords","journey11","beforeAll","process","env","FRODO_POLLY_MODE","afterAll","beforeEach","polly","server","any","on","_req","recording","filterRecording","FRODO_RECORD_PHASE","test","expect","updateCoordinates","toBeDefined","tree","JSON","parse","stringify","nodesAttributeName","serverTree","toBeNull","toMatchSnapshot","nodes","node1","x","node2","y","_rev","toStrictEqual","expectedTree","node5","node6","journeyNoCoords","staticNodes","node3","node4","readJourneys","journeys","exportJourney","concat","response","useStringArrays","coords","meta","Object","exportJourneys","journeyExport","assertions","toBeTruthy","enableJourney","result","disableJourney"],"sources":["../../src/ops/JourneyOps.test.ts"],"sourcesContent":["/**\n * To record and update snapshots, you must perform 3 steps in order:\n *\n * 1. Record API responses & update ESM snapshots\n *\n * This step breaks down into 4 phases:\n *\n * Phase 1: Record Non-destructive tests\n * Phase 2: Record Group 1 of DESTRUCTIVE tests - Deletes by ID\n * Phase 3: Record Group 2 of DESTRUCTIVE tests - Deletes by tag\n * Phase 4: Record Group 3 of DESTRUCTIVE tests - Delete all\n *\n * Because destructive tests interfere with the recording of non-destructive\n * tests and also interfere among themselves, they have to be run in groups\n * of non-interfering tests.\n *\n * To record and update ESM snapshots, you must call the test:record\n * script and override all the connection state variables required\n * to connect to the env to record from and also indicate the phase:\n *\n * FRODO_DEBUG=1 FRODO_RECORD_PHASE=1 FRODO_HOST=frodo-dev npm run test:record JourneyOps\n *\n * THESE TESTS ARE DESTRUCTIVE!!! DO NOT RUN AGAINST AN ENV WITH ACTIVE JOURNEYS!!!\n *\n * FRODO_DEBUG=1 FRODO_RECORD_PHASE=2 FRODO_HOST=frodo-dev npm run test:record JourneyOps\n * FRODO_DEBUG=1 FRODO_RECORD_PHASE=3 FRODO_HOST=frodo-dev npm run test:record JourneyOps\n * FRODO_DEBUG=1 FRODO_RECORD_PHASE=4 FRODO_HOST=frodo-dev npm run test:record JourneyOps\n *\n * The above command assumes that you have a connection profile for\n * 'frodo-dev' on your development machine.\n *\n * 2. Update CJS snapshots\n *\n * After recording, the ESM snapshots will already be updated as that happens\n * in one go, but you must manually update the CJS snapshots by running:\n *\n * FRODO_DEBUG=1 npm run test:update JourneyOps\n *\n * 3. Test your changes\n *\n * If 1 and 2 didn't produce any errors, you are ready to run the tests in\n * replay mode and make sure they all succeed as well:\n *\n * npm run test:only JourneyOps\n *\n * Note: FRODO_DEBUG=1 is optional and enables debug logging for some output\n * in case things don't function as expected\n */\nimport { state } from '../index';\nimport * as JourneyOps from './JourneyOps';\nimport { getJourney } from '../test/mocks/ForgeRockApiMockEngine';\nimport { autoSetupPolly, filterRecording } from '../utils/AutoSetupPolly';\nimport Constants from '../shared/Constants';\n\nconst ctx = autoSetupPolly();\n\nstate.setDeploymentType(Constants.CLOUD_DEPLOYMENT_TYPE_KEY);\n\nasync function stageJourney(journey: { id: string }, create = true) {\n // delete if exists, then create\n try {\n await JourneyOps.readJourney({ journeyId: journey.id, state });\n await JourneyOps.deleteJourney({\n journeyId: journey.id,\n options: {\n deep: true,\n verbose: false,\n progress: false,\n },\n state,\n });\n } catch (error) {\n // ignore\n } finally {\n if (create) {\n await JourneyOps.importJourney({\n importData: getJourney(journey.id),\n options: {\n reUuid: false,\n deps: true,\n },\n state,\n });\n }\n }\n}\n\ndescribe('JourneyOps', () => {\n const journey1 = {\n id: 'FrodoTestJourney1',\n };\n const journey2 = {\n id: 'FrodoTestJourney2',\n };\n const journey3 = {\n id: 'FrodoTestJourney3',\n };\n const journey4 = {\n id: 'FrodoTestJourney4',\n };\n const journey5 = {\n id: 'FrodoTestJourney5',\n };\n const journey6 = {\n id: 'FrodoTestJourney6',\n };\n const journey7 = {\n id: 'FrodoTestJourney7',\n };\n const journey8 = {\n id: 'FrodoTestJourney8',\n };\n const journey9 = {\n id: 'FrodoTestJourney9',\n };\n const journey10 = {\n id: 'FrodoTestJourney10',\n };\n const journey10NoCoords = {\n id: 'FrodoTestJourney10NoCoords'\n };\n const journey11 = {\n id: 'FrodoTestJourney11',\n }\n // in recording mode, setup test data before recording\n beforeAll(async () => {\n if (process.env.FRODO_POLLY_MODE === 'record') {\n await stageJourney(journey1);\n await stageJourney(journey2);\n await stageJourney(journey3);\n await stageJourney(journey4, false);\n await stageJourney(journey5, false);\n await stageJourney(journey6);\n await stageJourney(journey7);\n await stageJourney(journey8);\n await stageJourney(journey9);\n await stageJourney(journey10);\n await stageJourney(journey10NoCoords, false);\n await stageJourney(journey11, false);\n }\n });\n // in recording mode, remove test data after recording\n afterAll(async () => {\n if (process.env.FRODO_POLLY_MODE === 'record') {\n await stageJourney(journey1, false);\n await stageJourney(journey2, false);\n await stageJourney(journey3, false);\n await stageJourney(journey4, false);\n await stageJourney(journey5, false);\n await stageJourney(journey6, false);\n await stageJourney(journey7, false);\n await stageJourney(journey8, false);\n await stageJourney(journey9, false);\n await stageJourney(journey10, false);\n await stageJourney(journey10NoCoords, false);\n await stageJourney(journey11, false);\n }\n });\n beforeEach(async () => {\n if (process.env.FRODO_POLLY_MODE === 'record') {\n ctx.polly.server.any().on('beforePersist', (_req, recording) => {\n filterRecording(recording);\n });\n }\n });\n // Phase 1\n if (\n !process.env.FRODO_POLLY_MODE ||\n (process.env.FRODO_POLLY_MODE === 'record' &&\n process.env.FRODO_RECORD_PHASE === '1')\n ) {\n describe('updateCoordinates()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.updateCoordinates).toBeDefined();\n });\n\n test('1: Nothing changes when coordinates exist', async () => {\n const journey = getJourney(journey10.id);\n const tree = JSON.parse(JSON.stringify(journey.tree));\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: null,\n state\n })).toBeNull();\n expect(tree).toMatchSnapshot(journey.tree);\n });\n\n test('2: Update coordinates with server coordinates when server tree exists', async () => {\n const journey = getJourney(journey10.id);\n const tree = JSON.parse(JSON.stringify(journey.tree));\n delete tree.nodes.node1.x;\n delete tree.nodes.node2.y;\n const serverTree = await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: null,\n state\n });\n //Ignore the _rev field\n if (serverTree) serverTree._rev = journey.tree._rev;\n expect(serverTree).toStrictEqual(journey.tree);\n expect(tree).toMatchSnapshot(journey.tree);\n });\n\n test('3: Updates coordinates to 0 if serverTree does not exist', async () => {\n const journey = getJourney(journey11.id);\n const expectedTree = JSON.parse(JSON.stringify(journey.tree));\n expectedTree.nodes.node5.x = 0;\n expectedTree.nodes.node5.y = 0;\n expectedTree.nodes.node6.x = 0;\n expectedTree.nodes.node6.y = 0;\n const tree = JSON.parse(JSON.stringify(journey.tree));\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: null,\n state\n })).toBeNull();\n expect(tree).toMatchSnapshot(expectedTree);\n });\n\n test('4: Updates coordinates to 0 if serverTree nodes do not exist', async () => {\n const journey = getJourney(journey10NoCoords.id);\n const expectedTree = JSON.parse(JSON.stringify(journey.tree));\n expectedTree.nodes.node1.x = 0;\n expectedTree.nodes.node1.y = 0;\n expectedTree.nodes.node2.x = 0;\n expectedTree.nodes.node2.y = 0;\n const serverTree = JSON.parse(JSON.stringify(journey.tree));\n delete serverTree.nodes;\n const tree = JSON.parse(JSON.stringify(journey.tree));\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: serverTree,\n state\n })).toStrictEqual(serverTree);\n expect(tree).toStrictEqual(expectedTree);\n });\n\n test('5: Updates coordinates in various cases', async () => {\n const journey = getJourney(journey10.id);\n const journeyNoCoords = getJourney(journey10NoCoords.id);\n const expectedTree = JSON.parse(JSON.stringify(journey.tree));\n expectedTree.nodes.node1.x = 0;\n expectedTree.nodes.node2.y = 0;\n expectedTree.nodes.node2.x = 1001;\n expectedTree.staticNodes.node3.y = 0;\n expectedTree.staticNodes.node4.x = 0;\n expectedTree.staticNodes.node4.y = 1002;\n const serverTree = JSON.parse(JSON.stringify(journey.tree));\n delete serverTree.nodes.node1.x;\n delete serverTree.nodes.node2.y;\n delete serverTree.staticNodes.node3.y;\n delete serverTree.staticNodes.node4.x;\n const tree = JSON.parse(JSON.stringify(journeyNoCoords.tree));\n tree.nodes.node2.x = 1001;\n tree.staticNodes.node4.y = 1002;\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"nodes\",\n serverTree: serverTree,\n state\n })).toStrictEqual(serverTree);\n expect(await JourneyOps.updateCoordinates({\n tree: tree,\n nodesAttributeName: \"staticNodes\",\n serverTree: serverTree,\n state\n })).toStrictEqual(serverTree);\n expect(tree).toStrictEqual(expectedTree);\n });\n });\n\n describe('getJourneys()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.readJourneys).toBeDefined();\n });\n\n test('1: Get all journeys', async () => {\n const journeys = await JourneyOps.readJourneys({ state });\n expect(journeys).toMatchSnapshot();\n });\n });\n\n describe('exportJourney()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.exportJourney).toBeDefined();\n });\n\n test(`1: Export journey '${journey3.id}' w/o dependencies`, async () => {\n const response = await JourneyOps.exportJourney({\n journeyId: journey3.id,\n options: {\n useStringArrays: false,\n deps: false,\n coords: true,\n },\n state,\n });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n\n test(`2: Export journey '${journey3.id}' w/ dependencies`, async () => {\n const response = await JourneyOps.exportJourney({\n journeyId: journey3.id,\n options: {\n useStringArrays: false,\n deps: true,\n coords: true,\n },\n state,\n });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n\n test(`3: Export journey '${journey3.id}' w/ dependencies and w/o coordinates`, async () => {\n const response = await JourneyOps.exportJourney({\n journeyId: journey3.id,\n options: {\n useStringArrays: false,\n deps: true,\n coords: false,\n },\n state,\n });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n });\n\n describe('exportJourneys()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.exportJourneys).toBeDefined();\n });\n\n test('1: Export journeys w/o dependencies', async () => {\n const response = await JourneyOps.exportJourneys({ options: { deps: false, useStringArrays: true, coords: true }, state });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n\n test('1: Export journeys w/ dependencies', async () => {\n const response = await JourneyOps.exportJourneys({ options: { deps: true, useStringArrays: true, coords: true }, state });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n\n test('1: Export journeys w/ dependencies and w/o coordinates', async () => {\n const response = await JourneyOps.exportJourneys({ options: { deps: true, useStringArrays: true, coords: false }, state });\n expect(response).toMatchSnapshot({\n meta: expect.any(Object),\n });\n });\n });\n\n describe('importJourney()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.importJourney).toBeDefined();\n });\n\n test(`1: Import journey '${journey4.id}' w/o dependencies`, async () => {\n const journeyExport = getJourney(journey4.id);\n expect.assertions(1);\n const response = await JourneyOps.importJourney({\n importData: journeyExport,\n options: {\n reUuid: false,\n deps: false,\n },\n state,\n });\n expect(response).toBeTruthy();\n });\n\n test(`2: Import journey '${journey5.id}' w/ dependencies`, async () => {\n const journeyExport = getJourney(journey5.id);\n expect.assertions(1);\n const response = await JourneyOps.importJourney({\n importData: journeyExport,\n options: {\n reUuid: false,\n deps: true,\n },\n state,\n });\n expect(response).toBeTruthy();\n });\n });\n\n describe('enableJourney()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.enableJourney).toBeDefined();\n });\n\n test(`1: Enable disabled journey '${journey6.id}'`, async () => {\n expect.assertions(1);\n const result = await JourneyOps.enableJourney({\n journeyId: journey6.id,\n state,\n });\n expect(result).toBeTruthy();\n });\n\n test(`2: Enable already enabled journey '${journey7.id}'`, async () => {\n expect.assertions(1);\n const result = await JourneyOps.enableJourney({\n journeyId: journey7.id,\n state,\n });\n expect(result).toBeTruthy();\n });\n });\n\n describe('disableJourney()', () => {\n test('0: Method is implemented', async () => {\n expect(JourneyOps.disableJourney).toBeDefined();\n });\n\n test(`1: Disable enabled journey '${journey8.id}'`, async () => {\n expect.assertions(1);\n const result = await JourneyOps.disableJourney({\n journeyId: journey8.id,\n state,\n });\n expect(result).toBeTruthy();\n });\n\n test(`2: Disable already disabled journey '${journey9.id}'`, async () => {\n expect.assertions(1);\n const result = await JourneyOps.disableJourney({\n journeyId: journey9.id,\n state,\n });\n expect(result).toBeTruthy();\n });\n });\n }\n});\n"],"mappings":";;;;;;;;;;;sYAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA,IAAMA,GAAG,GAAG,IAAAC,8BAAc,EAAC,CAAC;AAE5BC,YAAK,CAACC,iBAAiB,CAACC,kBAAS,CAACC,yBAAyB,CAAC;AAAC,SAE9CC,YAAYA,CAAAC,EAAA;EAAA,OAAAC,aAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,cAAA;EAAAA,aAAA,GAAAG,iBAAA,CAA3B,WAA4BC,OAAuB,EAAiB;IAAA,IAAfC,MAAM,GAAAH,SAAA,CAAAI,MAAA,QAAAJ,SAAA,QAAAK,SAAA,GAAAL,SAAA,MAAG,IAAI;IAChE;IACA,IAAI;MACF,MAAMM,UAAU,CAACC,WAAW,CAAC;QAAEC,SAAS,EAAEN,OAAO,CAACO,EAAE;QAAEjB,KAAK,EAALA;MAAM,CAAC,CAAC;MAC9D,MAAMc,UAAU,CAACI,aAAa,CAAC;QAC7BF,SAAS,EAAEN,OAAO,CAACO,EAAE;QACrBE,OAAO,EAAE;UACPC,IAAI,EAAE,IAAI;UACVC,OAAO,EAAE,KAAK;UACdC,QAAQ,EAAE;QACZ,CAAC;QACDtB,KA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lF,UAAU,CAACiF,aAAa,CAAC;UAC5C/E,SAAS,EAAEoB,QAAQ,CAACnB,EAAE;UACtBjB,KAAK,EAALA;QACF,CAAC,CAAC;QACFyD,MAAM,CAACuC,MAAM,CAAC,CAACF,UAAU,CAAC,CAAC;MAC7B,CAAC,EAAC;IACJ,CAAC,CAAC;IAEFjE,QAAQ,CAAC,kBAAkB,EAAE,MAAM;MACjC2B,IAAI,CAAC,0BAA0B,eAAA/C,iBAAA,CAAE,aAAY;QAC3CgD,MAAM,CAAC3C,UAAU,CAACmF,cAAc,CAAC,CAACtC,WAAW,CAAC,CAAC;MACjD,CAAC,EAAC;MAEFH,IAAI,gCAAA6B,MAAA,CAAgChD,QAAQ,CAACpB,EAAE,qBAAAR,iBAAA,CAAK,aAAY;QAC9DgD,MAAM,CAACoC,UAAU,CAAC,CAAC,CAAC;QACpB,IAAMG,MAAM,SAASlF,UAAU,CAACmF,cAAc,CAAC;UAC7CjF,SAAS,EAAEqB,QAAQ,CAACpB,EAAE;UACtBjB,KAAK,EAALA;QACF,CAAC,CAAC;QACFyD,MAAM,CAACuC,MAAM,CAAC,CAACF,UAAU,CAAC,CAAC;MAC7B,CAAC,EAAC;MAEFtC,IAAI,yCAAA6B,MAAA,CAAyC/C,QAAQ,CAACrB,EAAE,qBAAAR,iBAAA,CAAK,aAAY;QACvEgD,MAAM,CAACoC,UAAU,CAAC,CAAC,CAAC;QACpB,IAAMG,MAAM,SAASlF,UAAU,CAACmF,cAAc,CAAC;UAC7CjF,SAAS,EAAEsB,QAAQ,CAACrB,EAAE;UACtBjB,KAAK,EAALA;QACF,CAAC,CAAC;QACFyD,MAAM,CAACuC,MAAM,CAAC,CAACF,UAAU,CAAC,CAAC;MAC7B,CAAC,EAAC;IACJ,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}
@@ -9,8 +9,10 @@ exports.default = void 0;
9
9
  exports.deleteNode = deleteNode;
10
10
  exports.findOrphanedNodes = findOrphanedNodes;
11
11
  exports.getNodeClassification = getNodeClassification;
12
+ exports.isCloudExcludedNode = isCloudExcludedNode;
12
13
  exports.isCloudOnlyNode = isCloudOnlyNode;
13
14
  exports.isCustomNode = isCustomNode;
15
+ exports.isDeprecatedNode = isDeprecatedNode;
14
16
  exports.isPremiumNode = isPremiumNode;
15
17
  exports.readNode = readNode;
16
18
  exports.readNodeTypes = readNodeTypes;
@@ -20,7 +22,9 @@ exports.removeOrphanedNodes = removeOrphanedNodes;
20
22
  exports.updateNode = updateNode;
21
23
  var _NodeApi = require("../api/NodeApi.js");
22
24
  var _TreeApi = require("../api/TreeApi.js");
25
+ var _Constants = _interopRequireDefault(require("../shared/Constants.js"));
23
26
  var _Console = require("../utils/Console.js");
27
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
28
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
25
29
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
26
30
  var _default = state => {
@@ -103,6 +107,18 @@ var _default = state => {
103
107
  isCloudOnlyNode(nodeType) {
104
108
  return isCloudOnlyNode(nodeType);
105
109
  },
110
+ isCloudExcludedNode(nodeType) {
111
+ return isCloudExcludedNode({
112
+ nodeType,
113
+ state
114
+ });
115
+ },
116
+ isDeprecatedNode(nodeType) {
117
+ return isDeprecatedNode({
118
+ nodeType,
119
+ state
120
+ });
121
+ },
106
122
  isCustomNode(nodeType) {
107
123
  return isCustomNode({
108
124
  nodeType,
@@ -122,7 +138,9 @@ var NodeClassification = exports.NodeClassification = /*#__PURE__*/function (Nod
122
138
  NodeClassification["STANDARD"] = "standard";
123
139
  NodeClassification["CUSTOM"] = "custom";
124
140
  NodeClassification["CLOUD"] = "cloud";
141
+ NodeClassification["EXCLUDED"] = "excluded";
125
142
  NodeClassification["PREMIUM"] = "premium";
143
+ NodeClassification["DEPRECATED"] = "deprecated";
126
144
  return NodeClassification;
127
145
  }({});
128
146
  var containerNodes = ['PageNode', 'CustomPageNode'];
@@ -497,13 +515,27 @@ function _removeOrphanedNodes() {
497
515
  });
498
516
  return _removeOrphanedNodes.apply(this, arguments);
499
517
  }
500
- var OOTB_NODE_TYPES_7 = ['AcceptTermsAndConditionsNode', 'AccountActiveDecisionNode', 'AccountLockoutNode', 'AgentDataStoreDecisionNode', 'AnonymousSessionUpgradeNode', 'AnonymousUserNode', 'AttributeCollectorNode', 'AttributePresentDecisionNode', 'AttributeValueDecisionNode', 'AuthLevelDecisionNode', 'ChoiceCollectorNode', 'ConsentNode', 'CookiePresenceDecisionNode', 'CreateObjectNode', 'CreatePasswordNode', 'DataStoreDecisionNode', 'DeviceGeoFencingNode', 'DeviceLocationMatchNode', 'DeviceMatchNode', 'DeviceProfileCollectorNode', 'DeviceSaveNode', 'DeviceTamperingVerificationNode', 'DisplayUserNameNode', 'EmailSuspendNode', 'EmailTemplateNode', 'IdentifyExistingUserNode', 'IncrementLoginCountNode', 'InnerTreeEvaluatorNode', 'IotAuthenticationNode', 'IotRegistrationNode', 'KbaCreateNode', 'KbaDecisionNode', 'KbaVerifyNode', 'LdapDecisionNode', 'LoginCountDecisionNode', 'MessageNode', 'MetadataNode', 'MeterNode', 'ModifyAuthLevelNode', 'OneTimePasswordCollectorDecisionNode', 'OneTimePasswordGeneratorNode', 'OneTimePasswordSmsSenderNode', 'OneTimePasswordSmtpSenderNode', 'PageNode', 'PasswordCollectorNode', 'PatchObjectNode', 'PersistentCookieDecisionNode', 'PollingWaitNode', 'ProfileCompletenessDecisionNode', 'ProvisionDynamicAccountNode', 'ProvisionIdmAccountNode', 'PushAuthenticationSenderNode', 'PushResultVerifierNode', 'QueryFilterDecisionNode', 'RecoveryCodeCollectorDecisionNode', 'RecoveryCodeDisplayNode', 'RegisterLogoutWebhookNode', 'RemoveSessionPropertiesNode', 'RequiredAttributesDecisionNode', 'RetryLimitDecisionNode', 'ScriptedDecisionNode', 'SelectIdPNode', 'SessionDataNode', 'SetFailureUrlNode', 'SetPersistentCookieNode', 'SetSessionPropertiesNode', 'SetSuccessUrlNode', 'SocialFacebookNode', 'SocialGoogleNode', 'SocialNode', 'SocialOAuthIgnoreProfileNode', 'SocialOpenIdConnectNode', 'SocialProviderHandlerNode', 'TermsAndConditionsDecisionNode', 'TimeSinceDecisionNode', 'TimerStartNode', 'TimerStopNode', 'UsernameCollectorNode', 'ValidatedPasswordNode', 'ValidatedUsernameNode', 'WebAuthnAuthenticationNode', 'WebAuthnDeviceStorageNode', 'WebAuthnRegistrationNode', 'ZeroPageLoginNode', 'product-CertificateCollectorNode', 'product-CertificateUserExtractorNode', 'product-CertificateValidationNode', 'product-KerberosNode', 'product-ReCaptchaNode', 'product-Saml2Node', 'product-WriteFederationInformationNode'];
501
- var OOTB_NODE_TYPES_7_1 = ['PushRegistrationNode', 'GetAuthenticatorAppNode', 'MultiFactorRegistrationOptionsNode', 'OptOutMultiFactorAuthenticationNode'].concat(OOTB_NODE_TYPES_7);
502
- var OOTB_NODE_TYPES_7_2 = ['OathRegistrationNode', 'OathTokenVerifierNode', 'PassthroughAuthenticationNode', 'ConfigProviderNode', 'DebugNode'].concat(OOTB_NODE_TYPES_7_1);
503
- var OOTB_NODE_TYPES_7_3 = [].concat(OOTB_NODE_TYPES_7_2);
504
- var OOTB_NODE_TYPES_7_4 = [].concat(OOTB_NODE_TYPES_7_3);
518
+ var OOTB_NODE_TYPES_7 = ['AcceptTermsAndConditionsNode', 'AccountActiveDecisionNode', 'AccountLockoutNode', 'AgentDataStoreDecisionNode', 'AnonymousSessionUpgradeNode', 'AnonymousUserNode', 'AttributeCollectorNode', 'AttributePresentDecisionNode', 'AttributeValueDecisionNode', 'AuthLevelDecisionNode', 'ChoiceCollectorNode', 'ConsentNode', 'CookiePresenceDecisionNode', 'CreateObjectNode', 'CreatePasswordNode', 'DataStoreDecisionNode', 'DeviceGeoFencingNode', 'DeviceLocationMatchNode', 'DeviceMatchNode', 'DeviceProfileCollectorNode', 'DeviceSaveNode', 'DeviceTamperingVerificationNode', 'DisplayUserNameNode', 'EmailSuspendNode', 'EmailTemplateNode', 'IdentifyExistingUserNode', 'IncrementLoginCountNode', 'InnerTreeEvaluatorNode', 'IotAuthenticationNode', 'IotRegistrationNode', 'KbaCreateNode', 'KbaDecisionNode', 'KbaVerifyNode', 'LdapDecisionNode', 'LoginCountDecisionNode', 'MessageNode', 'MetadataNode', 'MeterNode', 'ModifyAuthLevelNode', 'OneTimePasswordCollectorDecisionNode', 'OneTimePasswordGeneratorNode', 'OneTimePasswordSmsSenderNode', 'OneTimePasswordSmtpSenderNode', 'PageNode', 'PasswordCollectorNode', 'PatchObjectNode', 'PersistentCookieDecisionNode', 'PollingWaitNode', 'product-CertificateCollectorNode', 'product-CertificateUserExtractorNode', 'product-CertificateValidationNode', 'product-KerberosNode', 'product-ReCaptchaNode', 'product-Saml2Node', 'product-WriteFederationInformationNode', 'ProfileCompletenessDecisionNode', 'ProvisionDynamicAccountNode', 'ProvisionIdmAccountNode', 'PushAuthenticationSenderNode', 'PushResultVerifierNode', 'QueryFilterDecisionNode', 'RecoveryCodeCollectorDecisionNode', 'RecoveryCodeDisplayNode', 'RegisterLogoutWebhookNode', 'RemoveSessionPropertiesNode', 'RequiredAttributesDecisionNode', 'RetryLimitDecisionNode', 'ScriptedDecisionNode', 'SelectIdPNode', 'SessionDataNode', 'SetFailureUrlNode', 'SetPersistentCookieNode', 'SetSessionPropertiesNode', 'SetSuccessUrlNode', 'SocialFacebookNode', 'SocialGoogleNode', 'SocialNode', 'SocialOAuthIgnoreProfileNode', 'SocialOpenIdConnectNode', 'SocialProviderHandlerNode', 'TermsAndConditionsDecisionNode', 'TimerStartNode', 'TimerStopNode', 'TimeSinceDecisionNode', 'UsernameCollectorNode', 'ValidatedPasswordNode', 'ValidatedUsernameNode', 'WebAuthnAuthenticationNode', 'WebAuthnDeviceStorageNode', 'WebAuthnRegistrationNode', 'ZeroPageLoginNode'];
519
+ var DEPRECATED_NODE_TYPES_7 = [];
520
+ var OOTB_NODE_TYPES_7_1 = ['GetAuthenticatorAppNode', 'MultiFactorRegistrationOptionsNode', 'OptOutMultiFactorAuthenticationNode', 'PushRegistrationNode'].concat(OOTB_NODE_TYPES_7);
521
+ var DEPRECATED_NODE_TYPES_7_1 = [].concat(DEPRECATED_NODE_TYPES_7);
522
+ var OOTB_NODE_TYPES_7_2 = ['ConfigProviderNode', 'DebugNode', 'OathRegistrationNode', 'OathTokenVerifierNode', 'PassthroughAuthenticationNode', 'product-CaptchaNode', 'PushWaitNode', 'SetCustomCookieNode'].concat(OOTB_NODE_TYPES_7_1);
523
+ var DEPRECATED_NODE_TYPES_7_2 = ['product-ReCaptchaNode'].concat(DEPRECATED_NODE_TYPES_7_1);
524
+ var OOTB_NODE_TYPES_7_3 = ['CombinedMultiFactorRegistrationNode', 'OathDeviceStorageNode', 'OidcNode'].concat(OOTB_NODE_TYPES_7_2);
525
+ var DEPRECATED_NODE_TYPES_7_3 = [].concat(DEPRECATED_NODE_TYPES_7_2);
526
+ var OOTB_NODE_TYPES_7_4 = ['QueryParameterNode'].concat(OOTB_NODE_TYPES_7_3);
527
+ var DEPRECATED_NODE_TYPES_7_4 = [].concat(DEPRECATED_NODE_TYPES_7_3);
528
+ var OOTB_NODE_TYPES_7_5 = ['DeviceBindingNode', 'DeviceBindingStorageNode', 'DeviceSigningVerifierNode'].concat(OOTB_NODE_TYPES_7_4);
529
+ var DEPRECATED_NODE_TYPES_7_5 = ['SocialProviderHandlerNode'].concat(DEPRECATED_NODE_TYPES_7_4);
530
+
531
+ // move above 7 release nodes once 8 becomes a release version
532
+ var OOTB_NODE_TYPES_8 = [].concat(OOTB_NODE_TYPES_7_5);
533
+
534
+ // move above 7 release nodes once 8 becomes a release version
535
+ var DEPRECATED_NODE_TYPES_8 = [].concat(DEPRECATED_NODE_TYPES_7_5);
505
536
  var OOTB_NODE_TYPES_6_5 = ['AbstractSocialAuthLoginNode', 'AccountLockoutNode', 'AgentDataStoreDecisionNode', 'AnonymousUserNode', 'AuthLevelDecisionNode', 'ChoiceCollectorNode', 'CookiePresenceDecisionNode', 'CreatePasswordNode', 'DataStoreDecisionNode', 'InnerTreeEvaluatorNode', 'LdapDecisionNode', 'MessageNode', 'MetadataNode', 'MeterNode', 'ModifyAuthLevelNode', 'OneTimePasswordCollectorDecisionNode', 'OneTimePasswordGeneratorNode', 'OneTimePasswordSmsSenderNode', 'OneTimePasswordSmtpSenderNode', 'PageNode', 'PasswordCollectorNode', 'PersistentCookieDecisionNode', 'PollingWaitNode', 'ProvisionDynamicAccountNode', 'ProvisionIdmAccountNode', 'PushAuthenticationSenderNode', 'PushResultVerifierNode', 'RecoveryCodeCollectorDecisionNode', 'RecoveryCodeDisplayNode', 'RegisterLogoutWebhookNode', 'RemoveSessionPropertiesNode', 'RetryLimitDecisionNode', 'ScriptedDecisionNode', 'SessionDataNode', 'SetFailureUrlNode', 'SetPersistentCookieNode', 'SetSessionPropertiesNode', 'SetSuccessUrlNode', 'SocialFacebookNode', 'SocialGoogleNode', 'SocialNode', 'SocialOAuthIgnoreProfileNode', 'SocialOpenIdConnectNode', 'TimerStartNode', 'TimerStopNode', 'UsernameCollectorNode', 'WebAuthnAuthenticationNode', 'WebAuthnRegistrationNode', 'ZeroPageLoginNode'];
506
537
  var OOTB_NODE_TYPES_6 = ['AbstractSocialAuthLoginNode', 'AccountLockoutNode', 'AgentDataStoreDecisionNode', 'AnonymousUserNode', 'AuthLevelDecisionNode', 'ChoiceCollectorNode', 'CookiePresenceDecisionNode', 'CreatePasswordNode', 'DataStoreDecisionNode', 'InnerTreeEvaluatorNode', 'LdapDecisionNode', 'MessageNode', 'MetadataNode', 'MeterNode', 'ModifyAuthLevelNode', 'OneTimePasswordCollectorDecisionNode', 'OneTimePasswordGeneratorNode', 'OneTimePasswordSmsSenderNode', 'OneTimePasswordSmtpSenderNode', 'PageNode', 'PasswordCollectorNode', 'PersistentCookieDecisionNode', 'PollingWaitNode', 'ProvisionDynamicAccountNode', 'ProvisionIdmAccountNode', 'PushAuthenticationSenderNode', 'PushResultVerifierNode', 'RecoveryCodeCollectorDecisionNode', 'RecoveryCodeDisplayNode', 'RegisterLogoutWebhookNode', 'RemoveSessionPropertiesNode', 'RetryLimitDecisionNode', 'ScriptedDecisionNode', 'SessionDataNode', 'SetFailureUrlNode', 'SetPersistentCookieNode', 'SetSessionPropertiesNode', 'SetSuccessUrlNode', 'SocialFacebookNode', 'SocialGoogleNode', 'SocialNode', 'SocialOAuthIgnoreProfileNode', 'SocialOpenIdConnectNode', 'TimerStartNode', 'TimerStopNode', 'UsernameCollectorNode', 'WebAuthnAuthenticationNode', 'WebAuthnRegistrationNode', 'ZeroPageLoginNode'];
538
+ var CLOUD_EXCLUDED_NODE_TYPES = ['CreatePasswordNode', 'ProvisionDynamicAccountNode', 'ProvisionIdmAccountNode', 'SocialFacebookNode', 'SocialGoogleNode', 'SocialNode', 'SocialOAuthIgnoreProfileNode', 'SocialOpenIdConnectNode'];
507
539
  var CLOUD_ONLY_NODE_TYPES = ['IdentityStoreDecisionNode', 'AutonomousAccessSignalNode', 'AutonomousAccessDecisionNode', 'AutonomousAccessResultNode'];
508
540
  var PREMIUM_NODE_TYPES = ['AutonomousAccessSignalNode', 'AutonomousAccessDecisionNode', 'AutonomousAccessResultNode'];
509
541
 
@@ -525,22 +557,89 @@ function isCloudOnlyNode(nodeType) {
525
557
  return CLOUD_ONLY_NODE_TYPES.includes(nodeType);
526
558
  }
527
559
 
560
+ /**
561
+ * Analyze if a node is a cloud-excluded node. Cloud excluded nodes are OOTB nodes in self-hosted AM deployments but have been excluded in cloud.
562
+ * @param {{string, State}} param0 object containing node type and state.
563
+ * @returns {boolean} True if node type is cloud-excluded, false otherwise.
564
+ */
565
+ function isCloudExcludedNode(_ref10) {
566
+ var {
567
+ nodeType,
568
+ state
569
+ } = _ref10;
570
+ return state.getDeploymentType() === _Constants.default.CLOUD_DEPLOYMENT_TYPE_KEY && CLOUD_EXCLUDED_NODE_TYPES.includes(nodeType);
571
+ }
572
+
573
+ /**
574
+ * Analyze if node has been deprecated
575
+ * @param {{string, State}} param0 object containing node type and state.
576
+ * @returns {boolean} True if node type is deprecated, false otherwise.
577
+ */
578
+ function isDeprecatedNode(_ref11) {
579
+ var {
580
+ nodeType,
581
+ state
582
+ } = _ref11;
583
+ var deprecatedNodeTypes = [];
584
+ switch (state.getAmVersion()) {
585
+ case '8.0.0':
586
+ deprecatedNodeTypes = DEPRECATED_NODE_TYPES_8.slice(0);
587
+ break;
588
+ case '7.1.0':
589
+ case '7.1.1':
590
+ case '7.1.2':
591
+ case '7.1.3':
592
+ case '7.1.4':
593
+ deprecatedNodeTypes = DEPRECATED_NODE_TYPES_7_1.slice(0);
594
+ break;
595
+ case '7.2.0':
596
+ case '7.2.1':
597
+ deprecatedNodeTypes = DEPRECATED_NODE_TYPES_7_2.slice(0);
598
+ break;
599
+ case '7.3.0':
600
+ deprecatedNodeTypes = DEPRECATED_NODE_TYPES_7_3.slice(0);
601
+ break;
602
+ case '7.4.0':
603
+ deprecatedNodeTypes = DEPRECATED_NODE_TYPES_7_4.slice(0);
604
+ break;
605
+ case '7.5.0':
606
+ deprecatedNodeTypes = DEPRECATED_NODE_TYPES_7_5.slice(0);
607
+ break;
608
+ case '7.0.0':
609
+ case '7.0.1':
610
+ case '7.0.2':
611
+ deprecatedNodeTypes = DEPRECATED_NODE_TYPES_7.slice(0);
612
+ break;
613
+ default:
614
+ return false;
615
+ }
616
+ return deprecatedNodeTypes.includes(nodeType);
617
+ }
618
+
528
619
  /**
529
620
  * Analyze if a node is custom.
530
621
  * @param {string} nodeType Node type
531
622
  * @returns {boolean} True if the node type is custom, false otherwise.
532
623
  */
533
- function isCustomNode(_ref10) {
624
+ function isCustomNode(_ref12) {
534
625
  var {
535
626
  nodeType,
536
627
  state
537
- } = _ref10;
628
+ } = _ref12;
538
629
  var ootbNodeTypes = [];
539
630
  switch (state.getAmVersion()) {
631
+ case '8.0.0':
632
+ ootbNodeTypes = OOTB_NODE_TYPES_8.slice(0);
633
+ break;
540
634
  case '7.1.0':
635
+ case '7.1.1':
636
+ case '7.1.2':
637
+ case '7.1.3':
638
+ case '7.1.4':
541
639
  ootbNodeTypes = OOTB_NODE_TYPES_7_1.slice(0);
542
640
  break;
543
641
  case '7.2.0':
642
+ case '7.2.1':
544
643
  ootbNodeTypes = OOTB_NODE_TYPES_7_2.slice(0);
545
644
  break;
546
645
  case '7.3.0':
@@ -549,6 +648,9 @@ function isCustomNode(_ref10) {
549
648
  case '7.4.0':
550
649
  ootbNodeTypes = OOTB_NODE_TYPES_7_4.slice(0);
551
650
  break;
651
+ case '7.5.0':
652
+ ootbNodeTypes = OOTB_NODE_TYPES_7_5.slice(0);
653
+ break;
552
654
  case '7.0.0':
553
655
  case '7.0.1':
554
656
  case '7.0.2':
@@ -588,11 +690,11 @@ function isCustomNode(_ref10) {
588
690
  * @param {string} nodeType Node type
589
691
  * @returns {NodeClassification[]} an array of one or multiple classifications
590
692
  */
591
- function getNodeClassification(_ref11) {
693
+ function getNodeClassification(_ref13) {
592
694
  var {
593
695
  nodeType,
594
696
  state
595
- } = _ref11;
697
+ } = _ref13;
596
698
  var classifications = [];
597
699
  var premium = isPremiumNode(nodeType);
598
700
  var custom = isCustomNode({
@@ -600,14 +702,25 @@ function getNodeClassification(_ref11) {
600
702
  state
601
703
  });
602
704
  var cloud = isCloudOnlyNode(nodeType);
705
+ var excluded = isCloudExcludedNode({
706
+ nodeType,
707
+ state
708
+ });
709
+ var deprecated = isDeprecatedNode({
710
+ nodeType,
711
+ state
712
+ });
603
713
  if (custom) {
604
714
  classifications.push(NodeClassification.CUSTOM);
605
715
  } else if (cloud) {
606
716
  classifications.push(NodeClassification.CLOUD);
717
+ } else if (excluded) {
718
+ classifications.push(NodeClassification.EXCLUDED);
607
719
  } else {
608
720
  classifications.push(NodeClassification.STANDARD);
609
721
  }
610
722
  if (premium) classifications.push(NodeClassification.PREMIUM);
723
+ if (deprecated) classifications.push(NodeClassification.DEPRECATED);
611
724
  return classifications;
612
725
  }
613
726
  //# sourceMappingURL=NodeOps.js.map