@rockcarver/frodo-lib 1.0.0 → 2.0.0-1

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 (406) hide show
  1. package/CHANGELOG.md +3 -7
  2. package/cjs/api/AgentApi.js +91 -37
  3. package/cjs/api/AgentApi.js.map +1 -1
  4. package/cjs/api/AgentApi.test.js.map +1 -1
  5. package/cjs/api/ApiTypes.js.map +1 -1
  6. package/cjs/api/AuthenticateApi.js +18 -11
  7. package/cjs/api/AuthenticateApi.js.map +1 -1
  8. package/cjs/api/AuthenticateApi.test.js.map +1 -1
  9. package/cjs/api/BaseApi.js +50 -26
  10. package/cjs/api/BaseApi.js.map +1 -1
  11. package/cjs/api/CirclesOfTrustApi.js +47 -23
  12. package/cjs/api/CirclesOfTrustApi.js.map +1 -1
  13. package/cjs/api/IdmConfigApi.js +54 -21
  14. package/cjs/api/IdmConfigApi.js.map +1 -1
  15. package/cjs/api/IdmSystemApi.js +9 -6
  16. package/cjs/api/IdmSystemApi.js.map +1 -1
  17. package/cjs/api/ManagedObjectApi.js +49 -27
  18. package/cjs/api/ManagedObjectApi.js.map +1 -1
  19. package/cjs/api/NodeApi.js +71 -32
  20. package/cjs/api/NodeApi.js.map +1 -1
  21. package/cjs/api/NodeApi.test.js.map +1 -1
  22. package/cjs/api/OAuth2ClientApi.js +43 -20
  23. package/cjs/api/OAuth2ClientApi.js.map +1 -1
  24. package/cjs/api/OAuth2OIDCApi.js +74 -27
  25. package/cjs/api/OAuth2OIDCApi.js.map +1 -1
  26. package/cjs/api/OAuth2OIDCApi.test.js.map +1 -1
  27. package/cjs/api/OAuth2ProviderApi.js +10 -9
  28. package/cjs/api/OAuth2ProviderApi.js.map +1 -1
  29. package/cjs/api/PoliciesApi.js +54 -22
  30. package/cjs/api/PoliciesApi.js.map +1 -1
  31. package/cjs/api/PoliciesApi.test.js.map +1 -1
  32. package/cjs/api/PolicySetApi.js +54 -23
  33. package/cjs/api/PolicySetApi.js.map +1 -1
  34. package/cjs/api/PolicySetApi.test.js.map +1 -1
  35. package/cjs/api/RealmApi.js +73 -29
  36. package/cjs/api/RealmApi.js.map +1 -1
  37. package/cjs/api/ResourceTypesApi.js +67 -28
  38. package/cjs/api/ResourceTypesApi.js.map +1 -1
  39. package/cjs/api/ResourceTypesApi.test.js.map +1 -1
  40. package/cjs/api/Saml2Api.js +90 -122
  41. package/cjs/api/Saml2Api.js.map +1 -1
  42. package/cjs/api/ScriptApi.js +54 -23
  43. package/cjs/api/ScriptApi.js.map +1 -1
  44. package/cjs/api/ServerInfoApi.js +23 -10
  45. package/cjs/api/ServerInfoApi.js.map +1 -1
  46. package/cjs/api/ServiceApi.js +91 -42
  47. package/cjs/api/ServiceApi.js.map +1 -1
  48. package/cjs/api/SocialIdentityProvidersApi.js +70 -31
  49. package/cjs/api/SocialIdentityProvidersApi.js.map +1 -1
  50. package/cjs/api/TreeApi.js +43 -20
  51. package/cjs/api/TreeApi.js.map +1 -1
  52. package/cjs/api/TreeApi.test.js.map +1 -1
  53. package/cjs/api/cloud/EnvInfoApi.js +10 -6
  54. package/cjs/api/cloud/EnvInfoApi.js.map +1 -1
  55. package/cjs/api/cloud/FeatureApi.js +9 -6
  56. package/cjs/api/cloud/FeatureApi.js.map +1 -1
  57. package/cjs/api/cloud/LogApi.js +48 -18
  58. package/cjs/api/cloud/LogApi.js.map +1 -1
  59. package/cjs/api/cloud/SecretsApi.js +109 -35
  60. package/cjs/api/cloud/SecretsApi.js.map +1 -1
  61. package/cjs/api/cloud/SecretsApi.test.js.map +1 -1
  62. package/cjs/api/cloud/StartupApi.js +21 -10
  63. package/cjs/api/cloud/StartupApi.js.map +1 -1
  64. package/cjs/api/cloud/StartupApi.test.js.map +1 -1
  65. package/cjs/api/cloud/VariablesApi.js +52 -20
  66. package/cjs/api/cloud/VariablesApi.js.map +1 -1
  67. package/cjs/api/cloud/VariablesApi.test.js.map +1 -1
  68. package/cjs/api/utils/ApiUtils.js +2 -5
  69. package/cjs/api/utils/ApiUtils.js.map +1 -1
  70. package/cjs/api/utils/ApiUtils.test.js.map +1 -1
  71. package/cjs/index.js +22 -17
  72. package/cjs/index.js.map +1 -1
  73. package/cjs/lib/FrodoLib.js +142 -0
  74. package/cjs/lib/FrodoLib.js.map +1 -0
  75. package/cjs/ops/AdminOps.js +578 -90
  76. package/cjs/ops/AdminOps.js.map +1 -1
  77. package/cjs/ops/AgentOps.js +956 -118
  78. package/cjs/ops/AgentOps.js.map +1 -1
  79. package/cjs/ops/AgentOps.test.js.map +1 -1
  80. package/cjs/ops/AuthenticateOps.js +155 -87
  81. package/cjs/ops/AuthenticateOps.js.map +1 -1
  82. package/cjs/ops/AuthenticateOps.test.js.map +1 -1
  83. package/cjs/ops/CirclesOfTrustOps.js +334 -291
  84. package/cjs/ops/CirclesOfTrustOps.js.map +1 -1
  85. package/cjs/ops/ConnectionProfileOps.js +241 -46
  86. package/cjs/ops/ConnectionProfileOps.js.map +1 -1
  87. package/cjs/ops/ConnectionProfileOps.test.js.map +1 -1
  88. package/cjs/ops/EmailTemplateOps.js +84 -10
  89. package/cjs/ops/EmailTemplateOps.js.map +1 -1
  90. package/cjs/ops/EmailTemplateOps.test.js.map +1 -1
  91. package/cjs/ops/IdmOps.js +97 -81
  92. package/cjs/ops/IdmOps.js.map +1 -1
  93. package/cjs/ops/IdmOps.test.js.map +1 -1
  94. package/cjs/ops/IdpOps.js +275 -42
  95. package/cjs/ops/IdpOps.js.map +1 -1
  96. package/cjs/ops/IdpOps.test.js.map +1 -1
  97. package/cjs/ops/InfoOps.js +42 -27
  98. package/cjs/ops/InfoOps.js.map +1 -1
  99. package/cjs/ops/JoseOps.test.js.map +1 -1
  100. package/cjs/ops/JourneyOps.js +721 -126
  101. package/cjs/ops/JourneyOps.js.map +1 -1
  102. package/cjs/ops/JourneyOps.test.js.map +1 -1
  103. package/cjs/ops/ManagedObjectOps.js +79 -12
  104. package/cjs/ops/ManagedObjectOps.js.map +1 -1
  105. package/cjs/ops/NodeOps.js +127 -100
  106. package/cjs/ops/NodeOps.js.map +1 -1
  107. package/cjs/ops/OAuth2ClientOps.js +323 -65
  108. package/cjs/ops/OAuth2ClientOps.js.map +1 -1
  109. package/cjs/ops/OAuth2ClientOps.test.js.map +1 -1
  110. package/cjs/ops/OAuth2ProviderOps.js +20 -13
  111. package/cjs/ops/OAuth2ProviderOps.js.map +1 -1
  112. package/cjs/ops/OpsTypes.js.map +1 -1
  113. package/cjs/ops/OrganizationOps.js +67 -12
  114. package/cjs/ops/OrganizationOps.js.map +1 -1
  115. package/cjs/ops/PolicyOps.js +476 -136
  116. package/cjs/ops/PolicyOps.js.map +1 -1
  117. package/cjs/ops/PolicyOps.test.js.map +1 -1
  118. package/cjs/ops/PolicySetOps.js +402 -132
  119. package/cjs/ops/PolicySetOps.js.map +1 -1
  120. package/cjs/ops/PolicySetOps.test.js.map +1 -1
  121. package/cjs/ops/RealmOps.js +119 -84
  122. package/cjs/ops/RealmOps.js.map +1 -1
  123. package/cjs/ops/ResourceTypeOps.js +348 -95
  124. package/cjs/ops/ResourceTypeOps.js.map +1 -1
  125. package/cjs/ops/ResourceTypeOps.test.js.map +1 -1
  126. package/cjs/ops/Saml2Ops.js +407 -145
  127. package/cjs/ops/Saml2Ops.js.map +1 -1
  128. package/cjs/ops/Saml2Ops.test.js.map +1 -1
  129. package/cjs/ops/ScriptOps.js +256 -79
  130. package/cjs/ops/ScriptOps.js.map +1 -1
  131. package/cjs/ops/ScriptOps.test.js.map +1 -1
  132. package/cjs/ops/ServiceOps.js +328 -55
  133. package/cjs/ops/ServiceOps.js.map +1 -1
  134. package/cjs/ops/ThemeOps.js +349 -54
  135. package/cjs/ops/ThemeOps.js.map +1 -1
  136. package/cjs/ops/ThemeOps.test.js.map +1 -1
  137. package/cjs/ops/cloud/FeatureOps.js +57 -12
  138. package/cjs/ops/cloud/FeatureOps.js.map +1 -1
  139. package/cjs/ops/cloud/LogOps.js +136 -6
  140. package/cjs/ops/cloud/LogOps.js.map +1 -1
  141. package/cjs/ops/cloud/SecretsOps.js +230 -289
  142. package/cjs/ops/cloud/SecretsOps.js.map +1 -1
  143. package/cjs/ops/cloud/ServiceAccountOps.js +101 -18
  144. package/cjs/ops/cloud/ServiceAccountOps.js.map +1 -1
  145. package/cjs/ops/cloud/ServiceAccountOps.test.js.map +1 -1
  146. package/cjs/ops/cloud/StartupOps.js +64 -9
  147. package/cjs/ops/cloud/StartupOps.js.map +1 -1
  148. package/cjs/ops/cloud/VariablesOps.js +100 -175
  149. package/cjs/ops/cloud/VariablesOps.js.map +1 -1
  150. package/cjs/ops/utils/Console.js +9 -10
  151. package/cjs/ops/utils/Console.js.map +1 -1
  152. package/cjs/ops/utils/DataProtection.js +2 -2
  153. package/cjs/ops/utils/DataProtection.js.map +1 -1
  154. package/cjs/ops/utils/ExportImportUtils.js +35 -13
  155. package/cjs/ops/utils/ExportImportUtils.js.map +1 -1
  156. package/cjs/ops/utils/OpsUtils.js +7 -5
  157. package/cjs/ops/utils/OpsUtils.js.map +1 -1
  158. package/cjs/ops/utils/OpsUtils.test.js.map +1 -1
  159. package/cjs/ops/utils/{ValidationUtils.js → ScriptValidationUtils.js} +1 -1
  160. package/cjs/ops/utils/ScriptValidationUtils.js.map +1 -0
  161. package/cjs/ops/utils/ScriptValidationUtils.test.js.map +1 -0
  162. package/cjs/ops/utils/Version.js +9 -2
  163. package/cjs/ops/utils/Version.js.map +1 -1
  164. package/cjs/shared/State.js +455 -210
  165. package/cjs/shared/State.js.map +1 -1
  166. package/cjs/shared/State.test.js.map +1 -1
  167. package/cjs/utils/AutoSetupPolly.js +4 -1
  168. package/cjs/utils/AutoSetupPolly.js.map +1 -1
  169. package/esm/api/AgentApi.mjs +75 -27
  170. package/esm/api/AgentApi.test.mjs +319 -71
  171. package/esm/api/AuthenticateApi.mjs +15 -4
  172. package/esm/api/AuthenticateApi.test.mjs +27 -8
  173. package/esm/api/BaseApi.mjs +43 -19
  174. package/esm/api/CirclesOfTrustApi.mjs +39 -17
  175. package/esm/api/IdmConfigApi.mjs +44 -13
  176. package/esm/api/IdmSystemApi.mjs +7 -3
  177. package/esm/api/ManagedObjectApi.mjs +44 -20
  178. package/esm/api/NodeApi.mjs +59 -24
  179. package/esm/api/NodeApi.test.mjs +158 -40
  180. package/esm/api/OAuth2ClientApi.mjs +36 -15
  181. package/esm/api/OAuth2OIDCApi.mjs +69 -20
  182. package/esm/api/OAuth2OIDCApi.test.mjs +21 -3
  183. package/esm/api/OAuth2ProviderApi.mjs +8 -6
  184. package/esm/api/PoliciesApi.mjs +45 -16
  185. package/esm/api/PoliciesApi.test.mjs +63 -15
  186. package/esm/api/PolicySetApi.mjs +44 -16
  187. package/esm/api/PolicySetApi.test.mjs +48 -12
  188. package/esm/api/RealmApi.mjs +65 -24
  189. package/esm/api/ResourceTypesApi.mjs +56 -21
  190. package/esm/api/ResourceTypesApi.test.mjs +58 -14
  191. package/esm/api/Saml2Api.mjs +75 -89
  192. package/esm/api/ScriptApi.mjs +45 -17
  193. package/esm/api/ServerInfoApi.mjs +19 -6
  194. package/esm/api/ServiceApi.mjs +77 -26
  195. package/esm/api/SocialIdentityProvidersApi.mjs +58 -23
  196. package/esm/api/TreeApi.mjs +36 -15
  197. package/esm/api/TreeApi.test.mjs +129 -34
  198. package/esm/api/cloud/EnvInfoApi.mjs +8 -3
  199. package/esm/api/cloud/FeatureApi.mjs +7 -3
  200. package/esm/api/cloud/LogApi.mjs +38 -11
  201. package/esm/api/cloud/SecretsApi.mjs +89 -21
  202. package/esm/api/cloud/SecretsApi.test.mjs +193 -50
  203. package/esm/api/cloud/StartupApi.mjs +17 -6
  204. package/esm/api/cloud/StartupApi.test.mjs +28 -11
  205. package/esm/api/cloud/VariablesApi.mjs +43 -14
  206. package/esm/api/cloud/VariablesApi.test.mjs +124 -33
  207. package/esm/api/utils/ApiUtils.mjs +2 -4
  208. package/esm/api/utils/ApiUtils.test.mjs +14 -6
  209. package/esm/index.mjs +3 -4
  210. package/esm/lib/FrodoLib.mjs +127 -0
  211. package/esm/ops/AdminOps.mjs +500 -71
  212. package/esm/ops/AgentOps.mjs +773 -81
  213. package/esm/ops/AgentOps.test.mjs +296 -113
  214. package/esm/ops/AuthenticateOps.mjs +136 -64
  215. package/esm/ops/AuthenticateOps.test.mjs +7 -4
  216. package/esm/ops/CirclesOfTrustOps.mjs +278 -229
  217. package/esm/ops/ConnectionProfileOps.mjs +206 -35
  218. package/esm/ops/ConnectionProfileOps.test.mjs +25 -5
  219. package/esm/ops/EmailTemplateOps.mjs +66 -6
  220. package/esm/ops/EmailTemplateOps.test.mjs +32 -11
  221. package/esm/ops/IdmOps.mjs +60 -47
  222. package/esm/ops/IdmOps.test.mjs +54 -18
  223. package/esm/ops/IdpOps.mjs +227 -31
  224. package/esm/ops/IdpOps.test.mjs +57 -20
  225. package/esm/ops/InfoOps.mjs +36 -23
  226. package/esm/ops/JoseOps.test.mjs +8 -0
  227. package/esm/ops/JourneyOps.mjs +634 -96
  228. package/esm/ops/JourneyOps.test.mjs +73 -31
  229. package/esm/ops/ManagedObjectOps.mjs +66 -10
  230. package/esm/ops/NodeOps.mjs +108 -85
  231. package/esm/ops/OAuth2ClientOps.mjs +258 -42
  232. package/esm/ops/OAuth2ClientOps.test.mjs +80 -29
  233. package/esm/ops/OAuth2ProviderOps.mjs +11 -8
  234. package/esm/ops/OrganizationOps.mjs +56 -8
  235. package/esm/ops/PolicyOps.mjs +379 -93
  236. package/esm/ops/PolicyOps.test.mjs +180 -65
  237. package/esm/ops/PolicySetOps.mjs +311 -88
  238. package/esm/ops/PolicySetOps.test.mjs +108 -39
  239. package/esm/ops/RealmOps.mjs +85 -65
  240. package/esm/ops/ResourceTypeOps.mjs +268 -61
  241. package/esm/ops/ResourceTypeOps.test.mjs +113 -27
  242. package/esm/ops/Saml2Ops.mjs +346 -106
  243. package/esm/ops/Saml2Ops.test.mjs +117 -81
  244. package/esm/ops/ScriptOps.mjs +202 -56
  245. package/esm/ops/ScriptOps.test.mjs +64 -23
  246. package/esm/ops/ServiceOps.mjs +258 -27
  247. package/esm/ops/ThemeOps.mjs +300 -33
  248. package/esm/ops/ThemeOps.test.mjs +197 -47
  249. package/esm/ops/cloud/FeatureOps.mjs +45 -10
  250. package/esm/ops/cloud/LogOps.mjs +117 -4
  251. package/esm/ops/cloud/SecretsOps.mjs +123 -204
  252. package/esm/ops/cloud/ServiceAccountOps.mjs +85 -15
  253. package/esm/ops/cloud/ServiceAccountOps.test.mjs +16 -6
  254. package/esm/ops/cloud/StartupOps.mjs +49 -6
  255. package/esm/ops/cloud/VariablesOps.mjs +58 -120
  256. package/esm/ops/utils/Console.mjs +9 -8
  257. package/esm/ops/utils/DataProtection.mjs +2 -3
  258. package/esm/ops/utils/ExportImportUtils.mjs +28 -8
  259. package/esm/ops/utils/OpsUtils.mjs +4 -3
  260. package/esm/ops/utils/OpsUtils.test.mjs +21 -5
  261. package/esm/ops/utils/{ValidationUtils.mjs → ScriptValidationUtils.mjs} +1 -1
  262. package/esm/ops/utils/{ValidationUtils.test.mjs → ScriptValidationUtils.test.mjs} +2 -2
  263. package/esm/ops/utils/Version.mjs +8 -2
  264. package/esm/shared/State.mjs +459 -145
  265. package/esm/shared/State.test.mjs +8 -0
  266. package/esm/utils/AutoSetupPolly.mjs +4 -1
  267. package/package.json +1 -1
  268. package/types/api/AgentApi.d.ts +37 -8
  269. package/types/api/AgentApi.d.ts.map +1 -1
  270. package/types/api/ApiTypes.d.ts +12 -0
  271. package/types/api/ApiTypes.d.ts.map +1 -1
  272. package/types/api/AuthenticateApi.d.ts +13 -3
  273. package/types/api/AuthenticateApi.d.ts.map +1 -1
  274. package/types/api/BaseApi.d.ts +36 -7
  275. package/types/api/BaseApi.d.ts.map +1 -1
  276. package/types/api/CirclesOfTrustApi.d.ts +21 -7
  277. package/types/api/CirclesOfTrustApi.d.ts.map +1 -1
  278. package/types/api/IdmConfigApi.d.ts +28 -13
  279. package/types/api/IdmConfigApi.d.ts.map +1 -1
  280. package/types/api/IdmSystemApi.d.ts +4 -1
  281. package/types/api/IdmSystemApi.d.ts.map +1 -1
  282. package/types/api/ManagedObjectApi.d.ts +25 -10
  283. package/types/api/ManagedObjectApi.d.ts.map +1 -1
  284. package/types/api/NodeApi.d.ts +31 -9
  285. package/types/api/NodeApi.d.ts.map +1 -1
  286. package/types/api/OAuth2ClientApi.d.ts +18 -5
  287. package/types/api/OAuth2ClientApi.d.ts.map +1 -1
  288. package/types/api/OAuth2OIDCApi.d.ts +45 -11
  289. package/types/api/OAuth2OIDCApi.d.ts.map +1 -1
  290. package/types/api/OAuth2ProviderApi.d.ts +4 -1
  291. package/types/api/OAuth2ProviderApi.d.ts.map +1 -1
  292. package/types/api/PoliciesApi.d.ts +21 -5
  293. package/types/api/PoliciesApi.d.ts.map +1 -1
  294. package/types/api/PolicySetApi.d.ts +20 -5
  295. package/types/api/PolicySetApi.d.ts.map +1 -1
  296. package/types/api/RealmApi.d.ts +26 -10
  297. package/types/api/RealmApi.d.ts.map +1 -1
  298. package/types/api/ResourceTypesApi.d.ts +27 -8
  299. package/types/api/ResourceTypesApi.d.ts.map +1 -1
  300. package/types/api/Saml2Api.d.ts +39 -32
  301. package/types/api/Saml2Api.d.ts.map +1 -1
  302. package/types/api/ScriptApi.d.ts +21 -5
  303. package/types/api/ScriptApi.d.ts.map +1 -1
  304. package/types/api/ServerInfoApi.d.ts +9 -2
  305. package/types/api/ServerInfoApi.d.ts.map +1 -1
  306. package/types/api/ServiceApi.d.ts +41 -7
  307. package/types/api/ServiceApi.d.ts.map +1 -1
  308. package/types/api/SocialIdentityProvidersApi.d.ts +30 -8
  309. package/types/api/SocialIdentityProvidersApi.d.ts.map +1 -1
  310. package/types/api/TreeApi.d.ts +18 -4
  311. package/types/api/TreeApi.d.ts.map +1 -1
  312. package/types/api/cloud/EnvInfoApi.d.ts +4 -1
  313. package/types/api/cloud/EnvInfoApi.d.ts.map +1 -1
  314. package/types/api/cloud/FeatureApi.d.ts +4 -1
  315. package/types/api/cloud/FeatureApi.d.ts.map +1 -1
  316. package/types/api/cloud/LogApi.d.ts +24 -6
  317. package/types/api/cloud/LogApi.d.ts.map +1 -1
  318. package/types/api/cloud/SecretsApi.d.ts +50 -10
  319. package/types/api/cloud/SecretsApi.d.ts.map +1 -1
  320. package/types/api/cloud/StartupApi.d.ts +7 -2
  321. package/types/api/cloud/StartupApi.d.ts.map +1 -1
  322. package/types/api/cloud/VariablesApi.d.ts +23 -5
  323. package/types/api/cloud/VariablesApi.d.ts.map +1 -1
  324. package/types/api/utils/ApiUtils.d.ts +3 -2
  325. package/types/api/utils/ApiUtils.d.ts.map +1 -1
  326. package/types/index.d.ts +2 -2
  327. package/types/index.d.ts.map +1 -1
  328. package/types/lib/FrodoLib.d.ts +95 -0
  329. package/types/lib/FrodoLib.d.ts.map +1 -0
  330. package/types/ops/AdminOps.d.ts +71 -12
  331. package/types/ops/AdminOps.d.ts.map +1 -1
  332. package/types/ops/AgentOps.d.ts +345 -36
  333. package/types/ops/AgentOps.d.ts.map +1 -1
  334. package/types/ops/AuthenticateOps.d.ts +18 -5
  335. package/types/ops/AuthenticateOps.d.ts.map +1 -1
  336. package/types/ops/CirclesOfTrustOps.d.ts +76 -26
  337. package/types/ops/CirclesOfTrustOps.d.ts.map +1 -1
  338. package/types/ops/ConnectionProfileOps.d.ts +88 -9
  339. package/types/ops/ConnectionProfileOps.d.ts.map +1 -1
  340. package/types/ops/EmailTemplateOps.d.ts +36 -3
  341. package/types/ops/EmailTemplateOps.d.ts.map +1 -1
  342. package/types/ops/IdmOps.d.ts +28 -40
  343. package/types/ops/IdmOps.d.ts.map +1 -1
  344. package/types/ops/IdpOps.d.ts +88 -10
  345. package/types/ops/IdpOps.d.ts.map +1 -1
  346. package/types/ops/InfoOps.d.ts +12 -1
  347. package/types/ops/InfoOps.d.ts.map +1 -1
  348. package/types/ops/JourneyOps.d.ts +237 -34
  349. package/types/ops/JourneyOps.d.ts.map +1 -1
  350. package/types/ops/ManagedObjectOps.d.ts +37 -8
  351. package/types/ops/ManagedObjectOps.d.ts.map +1 -1
  352. package/types/ops/NodeOps.d.ts +61 -6
  353. package/types/ops/NodeOps.d.ts.map +1 -1
  354. package/types/ops/OAuth2ClientOps.d.ts +104 -10
  355. package/types/ops/OAuth2ClientOps.d.ts.map +1 -1
  356. package/types/ops/OAuth2ProviderOps.d.ts +8 -5
  357. package/types/ops/OAuth2ProviderOps.d.ts.map +1 -1
  358. package/types/ops/OpsTypes.d.ts +12 -1
  359. package/types/ops/OpsTypes.d.ts.map +1 -1
  360. package/types/ops/OrganizationOps.d.ts +24 -3
  361. package/types/ops/OrganizationOps.d.ts.map +1 -1
  362. package/types/ops/PolicyOps.d.ts +103 -28
  363. package/types/ops/PolicyOps.d.ts.map +1 -1
  364. package/types/ops/PolicySetOps.d.ts +76 -30
  365. package/types/ops/PolicySetOps.d.ts.map +1 -1
  366. package/types/ops/RealmOps.d.ts +34 -14
  367. package/types/ops/RealmOps.d.ts.map +1 -1
  368. package/types/ops/ResourceTypeOps.d.ts +116 -29
  369. package/types/ops/ResourceTypeOps.d.ts.map +1 -1
  370. package/types/ops/Saml2Ops.d.ts +124 -41
  371. package/types/ops/Saml2Ops.d.ts.map +1 -1
  372. package/types/ops/ScriptOps.d.ts +88 -23
  373. package/types/ops/ScriptOps.d.ts.map +1 -1
  374. package/types/ops/ServiceOps.d.ts +94 -8
  375. package/types/ops/ServiceOps.d.ts.map +1 -1
  376. package/types/ops/ThemeOps.d.ts +113 -9
  377. package/types/ops/ThemeOps.d.ts.map +1 -1
  378. package/types/ops/cloud/FeatureOps.d.ts +23 -2
  379. package/types/ops/cloud/FeatureOps.d.ts.map +1 -1
  380. package/types/ops/cloud/LogOps.d.ts +61 -3
  381. package/types/ops/cloud/LogOps.d.ts.map +1 -1
  382. package/types/ops/cloud/SecretsOps.d.ts +77 -63
  383. package/types/ops/cloud/SecretsOps.d.ts.map +1 -1
  384. package/types/ops/cloud/ServiceAccountOps.d.ts +48 -3
  385. package/types/ops/cloud/ServiceAccountOps.d.ts.map +1 -1
  386. package/types/ops/cloud/StartupOps.d.ts +25 -2
  387. package/types/ops/cloud/StartupOps.d.ts.map +1 -1
  388. package/types/ops/cloud/VariablesOps.d.ts +39 -39
  389. package/types/ops/cloud/VariablesOps.d.ts.map +1 -1
  390. package/types/ops/utils/Console.d.ts.map +1 -1
  391. package/types/ops/utils/DataProtection.d.ts +1 -1
  392. package/types/ops/utils/DataProtection.d.ts.map +1 -1
  393. package/types/ops/utils/ExportImportUtils.d.ts +29 -11
  394. package/types/ops/utils/ExportImportUtils.d.ts.map +1 -1
  395. package/types/ops/utils/OpsUtils.d.ts +4 -1
  396. package/types/ops/utils/OpsUtils.d.ts.map +1 -1
  397. package/types/ops/utils/ScriptValidationUtils.d.ts.map +1 -0
  398. package/types/ops/utils/Version.d.ts +5 -1
  399. package/types/ops/utils/Version.d.ts.map +1 -1
  400. package/types/shared/State.d.ts +80 -177
  401. package/types/shared/State.d.ts.map +1 -1
  402. package/types/utils/AutoSetupPolly.d.ts.map +1 -1
  403. package/cjs/ops/utils/ValidationUtils.js.map +0 -1
  404. package/cjs/ops/utils/ValidationUtils.test.js.map +0 -1
  405. package/types/ops/utils/ValidationUtils.d.ts.map +0 -1
  406. /package/types/ops/utils/{ValidationUtils.d.ts → ScriptValidationUtils.d.ts} +0 -0
@@ -2,6 +2,135 @@ import { getConfigEntity, putConfigEntity } from '../api/IdmConfigApi';
2
2
  import { getCurrentRealmName } from '../api/utils/ApiUtils';
3
3
  import { debugMessage } from '../ops/utils/Console';
4
4
  export const THEMEREALM_ID = 'ui/themerealm';
5
+ export default class ThemeOps {
6
+ constructor(state) {
7
+ this.state = state;
8
+ }
9
+
10
+ /**
11
+ * Get all themes
12
+ * @param {string} realm realm name
13
+ * @returns {Promise<ThemeSkeleton[]>} a promise that resolves to an array of themes
14
+ */
15
+ async getThemes() {
16
+ return getThemes({
17
+ state: this.state
18
+ });
19
+ }
20
+
21
+ /**
22
+ * Get theme by id
23
+ * @param {string} themeId theme id
24
+ * @param {string} realm realm name
25
+ * @returns {Promise<ThemeSkeleton>} a promise that resolves to a theme object
26
+ */
27
+ async getTheme(themeId, realm) {
28
+ return getTheme({
29
+ themeId,
30
+ realm,
31
+ state: this.state
32
+ });
33
+ }
34
+
35
+ /**
36
+ * Get theme by name
37
+ * @param {string} themeName theme name
38
+ * @param {string} realm realm name
39
+ * @returns {Promise<ThemeSkeleton>} a promise that resolves to a theme object
40
+ */
41
+ async getThemeByName(themeName, realm) {
42
+ return getThemeByName({
43
+ themeName,
44
+ realm,
45
+ state: this.state
46
+ });
47
+ }
48
+
49
+ /**
50
+ * Put theme by id
51
+ * @param {string} themeId theme id
52
+ * @param {ThemeSkeleton} themeData theme object
53
+ * @param {string} realm realm name
54
+ * @returns {Promise<ThemeSkeleton>} a promise that resolves to a theme object
55
+ */
56
+ async putTheme(themeId, themeData, realm) {
57
+ return putTheme({
58
+ themeId,
59
+ themeData,
60
+ realm,
61
+ state: this.state
62
+ });
63
+ }
64
+
65
+ /**
66
+ * Put theme by name
67
+ * @param {String} themeName theme name
68
+ * @param {ThemeSkeleton} themeData theme object
69
+ * @param {string} realm realm name
70
+ * @returns {Promise<ThemeSkeleton>} a promise that resolves to a theme object
71
+ */
72
+ async putThemeByName(themeName, themeData, realm) {
73
+ return putThemeByName({
74
+ themeName,
75
+ themeData,
76
+ realm,
77
+ state: this.state
78
+ });
79
+ }
80
+
81
+ /**
82
+ * Put all themes
83
+ * @param {Map<string, ThemeSkeleton>} allThemesData themes object containing all themes for all realms
84
+ * @param {string} realm realm name
85
+ * @returns {Promise<Map<string, ThemeSkeleton>>} a promise that resolves to a themes object
86
+ */
87
+ async putThemes(themeMap) {
88
+ return putThemes({
89
+ themeMap,
90
+ state: this.state
91
+ });
92
+ }
93
+
94
+ /**
95
+ * Delete theme by id
96
+ * @param {string} themeId theme id
97
+ * @param {string} realm realm name
98
+ * @returns {Promise<ThemeSkeleton>} a promise that resolves to a themes object
99
+ */
100
+ async deleteTheme(themeId, realm) {
101
+ return deleteTheme({
102
+ themeId,
103
+ realm,
104
+ state: this.state
105
+ });
106
+ }
107
+
108
+ /**
109
+ * Delete theme by name
110
+ * @param {string} themeName theme name
111
+ * @param {string} realm realm name
112
+ * @returns {Promise<ThemeSkeleton>} a promise that resolves to a themes object
113
+ */
114
+ async deleteThemeByName(themeName, realm) {
115
+ return deleteThemeByName({
116
+ themeName,
117
+ realm,
118
+ state: this.state
119
+ });
120
+ }
121
+
122
+ /**
123
+ * Delete all themes
124
+ * @param {string} realm realm name
125
+ * @returns {Promise<ThemeSkeleton[]>} a promise that resolves to an array of themes
126
+ */
127
+ async deleteThemes(realm) {
128
+ return deleteThemes({
129
+ realm,
130
+ state: this.state
131
+ });
132
+ }
133
+ }
5
134
 
6
135
  /**
7
136
  * Get realm themes
@@ -9,7 +138,10 @@ export const THEMEREALM_ID = 'ui/themerealm';
9
138
  * @param {string} realm realm name
10
139
  * @returns {ThemeSkeleton[]} array of theme pertaining to the current realm
11
140
  */
12
- function getRealmThemes(themes, realm = getCurrentRealmName()) {
141
+ function getRealmThemes({
142
+ themes,
143
+ realm
144
+ }) {
13
145
  if (themes.realm && themes.realm[realm]) {
14
146
  return themes.realm[realm];
15
147
  }
@@ -21,9 +153,19 @@ function getRealmThemes(themes, realm = getCurrentRealmName()) {
21
153
  * @param {string} realm realm name
22
154
  * @returns {Promise<ThemeSkeleton[]>} a promise that resolves to an array of themes
23
155
  */
24
- export async function getThemes(realm = getCurrentRealmName()) {
25
- const themes = await getConfigEntity(THEMEREALM_ID);
26
- return getRealmThemes(themes, realm);
156
+ export async function getThemes({
157
+ realm = null,
158
+ state
159
+ }) {
160
+ realm = realm ? realm : getCurrentRealmName(state);
161
+ const themes = await getConfigEntity({
162
+ entityId: THEMEREALM_ID,
163
+ state
164
+ });
165
+ return getRealmThemes({
166
+ themes,
167
+ realm
168
+ });
27
169
  }
28
170
 
29
171
  /**
@@ -32,9 +174,20 @@ export async function getThemes(realm = getCurrentRealmName()) {
32
174
  * @param {string} realm realm name
33
175
  * @returns {Promise<ThemeSkeleton>} a promise that resolves to a theme object
34
176
  */
35
- export async function getTheme(themeId, realm = getCurrentRealmName()) {
36
- const themes = await getConfigEntity(THEMEREALM_ID);
37
- const found = getRealmThemes(themes, realm).filter(theme => theme._id === themeId);
177
+ export async function getTheme({
178
+ themeId,
179
+ realm,
180
+ state
181
+ }) {
182
+ realm ? realm : getCurrentRealmName(state);
183
+ const themes = await getConfigEntity({
184
+ entityId: THEMEREALM_ID,
185
+ state
186
+ });
187
+ const found = getRealmThemes({
188
+ themes,
189
+ realm
190
+ }).filter(theme => theme._id === themeId);
38
191
  if (found.length === 1) {
39
192
  return found[0];
40
193
  }
@@ -50,9 +203,20 @@ export async function getTheme(themeId, realm = getCurrentRealmName()) {
50
203
  * @param {string} realm realm name
51
204
  * @returns {Promise<ThemeSkeleton>} a promise that resolves to a theme object
52
205
  */
53
- export async function getThemeByName(themeName, realm = getCurrentRealmName()) {
54
- const themes = await getConfigEntity(THEMEREALM_ID);
55
- const found = getRealmThemes(themes, realm).filter(theme => theme.name === themeName);
206
+ export async function getThemeByName({
207
+ themeName,
208
+ realm,
209
+ state
210
+ }) {
211
+ realm ? realm : getCurrentRealmName(state);
212
+ const themes = await getConfigEntity({
213
+ entityId: THEMEREALM_ID,
214
+ state
215
+ });
216
+ const found = getRealmThemes({
217
+ themes,
218
+ realm
219
+ }).filter(theme => theme.name === themeName);
56
220
  if (found.length === 1) {
57
221
  return found[0];
58
222
  }
@@ -69,12 +233,24 @@ export async function getThemeByName(themeName, realm = getCurrentRealmName()) {
69
233
  * @param {string} realm realm name
70
234
  * @returns {Promise<ThemeSkeleton>} a promise that resolves to a theme object
71
235
  */
72
- export async function putTheme(themeId, themeData, realm = getCurrentRealmName()) {
236
+ export async function putTheme({
237
+ themeId,
238
+ themeData,
239
+ realm,
240
+ state
241
+ }) {
242
+ realm ? realm : getCurrentRealmName(state);
73
243
  const data = themeData;
74
244
  data._id = themeId;
75
- const themes = await getConfigEntity(THEMEREALM_ID);
245
+ const themes = await getConfigEntity({
246
+ entityId: THEMEREALM_ID,
247
+ state
248
+ });
76
249
  let isNew = true;
77
- const realmThemes = getRealmThemes(themes, realm).map(theme => {
250
+ const realmThemes = getRealmThemes({
251
+ themes,
252
+ realm
253
+ }).map(theme => {
78
254
  if (theme._id === themeId) {
79
255
  isNew = false;
80
256
  return data;
@@ -86,7 +262,14 @@ export async function putTheme(themeId, themeData, realm = getCurrentRealmName()
86
262
  realmThemes.push(data);
87
263
  }
88
264
  themes.realm[realm] = realmThemes;
89
- const found = getRealmThemes(await putConfigEntity(THEMEREALM_ID, themes), realm).filter(theme => theme._id === themeId);
265
+ const found = getRealmThemes({
266
+ themes: await putConfigEntity({
267
+ entityId: THEMEREALM_ID,
268
+ entityData: themes,
269
+ state
270
+ }),
271
+ realm
272
+ }).filter(theme => theme._id === themeId);
90
273
  if (found.length === 1) {
91
274
  return found[0];
92
275
  }
@@ -103,12 +286,24 @@ export async function putTheme(themeId, themeData, realm = getCurrentRealmName()
103
286
  * @param {string} realm realm name
104
287
  * @returns {Promise<ThemeSkeleton>} a promise that resolves to a theme object
105
288
  */
106
- export async function putThemeByName(themeName, themeData, realm = getCurrentRealmName()) {
289
+ export async function putThemeByName({
290
+ themeName,
291
+ themeData,
292
+ realm,
293
+ state
294
+ }) {
295
+ realm ? realm : getCurrentRealmName(state);
107
296
  const data = themeData;
108
297
  data.name = themeName;
109
- const themes = await getConfigEntity(THEMEREALM_ID);
298
+ const themes = await getConfigEntity({
299
+ entityId: THEMEREALM_ID,
300
+ state
301
+ });
110
302
  let isNew = true;
111
- const realmThemes = getRealmThemes(themes, realm).map(theme => {
303
+ const realmThemes = getRealmThemes({
304
+ themes,
305
+ realm
306
+ }).map(theme => {
112
307
  if (theme.name === themeName) {
113
308
  isNew = false;
114
309
  return data;
@@ -120,7 +315,14 @@ export async function putThemeByName(themeName, themeData, realm = getCurrentRea
120
315
  realmThemes.push(data);
121
316
  }
122
317
  themes['realm'][realm] = realmThemes;
123
- const found = getRealmThemes(await putConfigEntity(THEMEREALM_ID, themes), realm).filter(theme => theme.name === themeName);
318
+ const found = getRealmThemes({
319
+ themes: await putConfigEntity({
320
+ entityId: THEMEREALM_ID,
321
+ entityData: themes,
322
+ state
323
+ }),
324
+ realm
325
+ }).filter(theme => theme.name === themeName);
124
326
  if (found.length === 1) {
125
327
  return found[0];
126
328
  }
@@ -136,14 +338,25 @@ export async function putThemeByName(themeName, themeData, realm = getCurrentRea
136
338
  * @param {string} realm realm name
137
339
  * @returns {Promise<Map<string, ThemeSkeleton>>} a promise that resolves to a themes object
138
340
  */
139
- export async function putThemes(themeMap, realm = getCurrentRealmName()) {
341
+ export async function putThemes({
342
+ themeMap,
343
+ realm = null,
344
+ state
345
+ }) {
140
346
  debugMessage(`ThemeApi.putThemes: start`);
141
- const themes = await getConfigEntity(THEMEREALM_ID);
347
+ realm = realm ? realm : getCurrentRealmName(state);
348
+ const themes = await getConfigEntity({
349
+ entityId: THEMEREALM_ID,
350
+ state
351
+ });
142
352
  const allThemeIDs = Object.keys(themeMap);
143
353
  const existingThemeIDs = [];
144
354
  let defaultThemeId = null;
145
355
  // update existing themes
146
- let realmThemes = getRealmThemes(themes, realm).map(theme => {
356
+ let realmThemes = getRealmThemes({
357
+ themes,
358
+ realm
359
+ }).map(theme => {
147
360
  if (themeMap[theme._id]) {
148
361
  debugMessage(`Update theme: ${theme._id} - ${theme.name}`);
149
362
  existingThemeIDs.push(theme._id);
@@ -169,7 +382,14 @@ export async function putThemes(themeMap, realm = getCurrentRealmName()) {
169
382
  });
170
383
  }
171
384
  themes.realm[realm] = realmThemes;
172
- const updatedThemes = new Map(getRealmThemes(await putConfigEntity(THEMEREALM_ID, themes), realm).map(theme => [theme._id, theme]));
385
+ const updatedThemes = new Map(getRealmThemes({
386
+ themes: await putConfigEntity({
387
+ entityId: THEMEREALM_ID,
388
+ entityData: themes,
389
+ state
390
+ }),
391
+ realm
392
+ }).map(theme => [theme._id, theme]));
173
393
  debugMessage(updatedThemes);
174
394
  debugMessage(`ThemeApi.putThemes: finished`);
175
395
  return updatedThemes;
@@ -181,9 +401,20 @@ export async function putThemes(themeMap, realm = getCurrentRealmName()) {
181
401
  * @param {string} realm realm name
182
402
  * @returns {Promise<ThemeSkeleton>} a promise that resolves to a themes object
183
403
  */
184
- export async function deleteTheme(themeId, realm = getCurrentRealmName()) {
185
- const themes = await getConfigEntity(THEMEREALM_ID);
186
- const realmThemes = getRealmThemes(themes, realm);
404
+ export async function deleteTheme({
405
+ themeId,
406
+ realm,
407
+ state
408
+ }) {
409
+ realm ? realm : getCurrentRealmName(state);
410
+ const themes = await getConfigEntity({
411
+ entityId: THEMEREALM_ID,
412
+ state
413
+ });
414
+ const realmThemes = getRealmThemes({
415
+ themes,
416
+ realm
417
+ });
187
418
  const deletedThemes = [];
188
419
  const finalThemes = realmThemes.filter(theme => {
189
420
  if (theme._id !== themeId) {
@@ -194,7 +425,14 @@ export async function deleteTheme(themeId, realm = getCurrentRealmName()) {
194
425
  });
195
426
  if (realmThemes.length === finalThemes.length) throw new Error(`'${themeId}' not found in realm '${realm}'`);
196
427
  themes.realm[realm] = realmThemes;
197
- const undeletedThemes = getRealmThemes(await putConfigEntity(THEMEREALM_ID, themes), realm).filter(theme => deletedThemes.includes(theme));
428
+ const undeletedThemes = getRealmThemes({
429
+ themes: await putConfigEntity({
430
+ entityId: THEMEREALM_ID,
431
+ entityData: themes,
432
+ state
433
+ }),
434
+ realm
435
+ }).filter(theme => deletedThemes.includes(theme));
198
436
  if (deletedThemes.length > 0 && undeletedThemes.length === 0) {
199
437
  return deletedThemes[0];
200
438
  }
@@ -207,9 +445,20 @@ export async function deleteTheme(themeId, realm = getCurrentRealmName()) {
207
445
  * @param {string} realm realm name
208
446
  * @returns {Promise<ThemeSkeleton>} a promise that resolves to a themes object
209
447
  */
210
- export async function deleteThemeByName(themeName, realm = getCurrentRealmName()) {
211
- const themes = await getConfigEntity(THEMEREALM_ID);
212
- const realmThemes = getRealmThemes(themes, realm);
448
+ export async function deleteThemeByName({
449
+ themeName,
450
+ realm,
451
+ state
452
+ }) {
453
+ realm ? realm : getCurrentRealmName(state);
454
+ const themes = await getConfigEntity({
455
+ entityId: THEMEREALM_ID,
456
+ state
457
+ });
458
+ const realmThemes = getRealmThemes({
459
+ themes,
460
+ realm
461
+ });
213
462
  const deletedThemes = [];
214
463
  const finalThemes = realmThemes.filter(theme => {
215
464
  if (theme.name !== themeName) {
@@ -220,7 +469,14 @@ export async function deleteThemeByName(themeName, realm = getCurrentRealmName()
220
469
  });
221
470
  if (realmThemes.length === finalThemes.length) throw new Error(`'${themeName}' not found in realm '${realm}'`);
222
471
  themes.realm[realm] = finalThemes;
223
- const undeletedThemes = getRealmThemes(await putConfigEntity(THEMEREALM_ID, themes), realm).filter(theme => deletedThemes.includes(theme));
472
+ const undeletedThemes = getRealmThemes({
473
+ themes: await putConfigEntity({
474
+ entityId: THEMEREALM_ID,
475
+ entityData: themes,
476
+ state
477
+ }),
478
+ realm
479
+ }).filter(theme => deletedThemes.includes(theme));
224
480
  if (deletedThemes.length > 0 && undeletedThemes.length === 0) {
225
481
  return deletedThemes[0];
226
482
  }
@@ -232,8 +488,15 @@ export async function deleteThemeByName(themeName, realm = getCurrentRealmName()
232
488
  * @param {string} realm realm name
233
489
  * @returns {Promise<ThemeSkeleton[]>} a promise that resolves to an array of themes
234
490
  */
235
- export async function deleteThemes(realm = getCurrentRealmName()) {
236
- const themes = await getConfigEntity(THEMEREALM_ID);
491
+ export async function deleteThemes({
492
+ realm,
493
+ state
494
+ }) {
495
+ realm ? realm : getCurrentRealmName(state);
496
+ const themes = await getConfigEntity({
497
+ entityId: THEMEREALM_ID,
498
+ state
499
+ });
237
500
  const realmThemes = themes.realm[realm];
238
501
  if (!realmThemes) throw new Error(`No theme configuration found for realm '${realm}'`);
239
502
  const deletedThemes = [];
@@ -241,7 +504,11 @@ export async function deleteThemes(realm = getCurrentRealmName()) {
241
504
  deletedThemes.push(theme);
242
505
  }
243
506
  themes.realm[realm] = [];
244
- await putConfigEntity(THEMEREALM_ID, themes);
507
+ await putConfigEntity({
508
+ entityId: THEMEREALM_ID,
509
+ entityData: themes,
510
+ state
511
+ });
245
512
  return deletedThemes;
246
513
  }
247
514
  //# sourceMappingURL=ThemeOps.js.map