@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.
- package/CHANGELOG.md +3 -7
- package/cjs/api/AgentApi.js +91 -37
- package/cjs/api/AgentApi.js.map +1 -1
- package/cjs/api/AgentApi.test.js.map +1 -1
- package/cjs/api/ApiTypes.js.map +1 -1
- package/cjs/api/AuthenticateApi.js +18 -11
- package/cjs/api/AuthenticateApi.js.map +1 -1
- package/cjs/api/AuthenticateApi.test.js.map +1 -1
- package/cjs/api/BaseApi.js +50 -26
- package/cjs/api/BaseApi.js.map +1 -1
- package/cjs/api/CirclesOfTrustApi.js +47 -23
- package/cjs/api/CirclesOfTrustApi.js.map +1 -1
- package/cjs/api/IdmConfigApi.js +54 -21
- package/cjs/api/IdmConfigApi.js.map +1 -1
- package/cjs/api/IdmSystemApi.js +9 -6
- package/cjs/api/IdmSystemApi.js.map +1 -1
- package/cjs/api/ManagedObjectApi.js +49 -27
- package/cjs/api/ManagedObjectApi.js.map +1 -1
- package/cjs/api/NodeApi.js +71 -32
- package/cjs/api/NodeApi.js.map +1 -1
- package/cjs/api/NodeApi.test.js.map +1 -1
- package/cjs/api/OAuth2ClientApi.js +43 -20
- package/cjs/api/OAuth2ClientApi.js.map +1 -1
- package/cjs/api/OAuth2OIDCApi.js +74 -27
- package/cjs/api/OAuth2OIDCApi.js.map +1 -1
- package/cjs/api/OAuth2OIDCApi.test.js.map +1 -1
- package/cjs/api/OAuth2ProviderApi.js +10 -9
- package/cjs/api/OAuth2ProviderApi.js.map +1 -1
- package/cjs/api/PoliciesApi.js +54 -22
- package/cjs/api/PoliciesApi.js.map +1 -1
- package/cjs/api/PoliciesApi.test.js.map +1 -1
- package/cjs/api/PolicySetApi.js +54 -23
- package/cjs/api/PolicySetApi.js.map +1 -1
- package/cjs/api/PolicySetApi.test.js.map +1 -1
- package/cjs/api/RealmApi.js +73 -29
- package/cjs/api/RealmApi.js.map +1 -1
- package/cjs/api/ResourceTypesApi.js +67 -28
- package/cjs/api/ResourceTypesApi.js.map +1 -1
- package/cjs/api/ResourceTypesApi.test.js.map +1 -1
- package/cjs/api/Saml2Api.js +90 -122
- package/cjs/api/Saml2Api.js.map +1 -1
- package/cjs/api/ScriptApi.js +54 -23
- package/cjs/api/ScriptApi.js.map +1 -1
- package/cjs/api/ServerInfoApi.js +23 -10
- package/cjs/api/ServerInfoApi.js.map +1 -1
- package/cjs/api/ServiceApi.js +91 -42
- package/cjs/api/ServiceApi.js.map +1 -1
- package/cjs/api/SocialIdentityProvidersApi.js +70 -31
- package/cjs/api/SocialIdentityProvidersApi.js.map +1 -1
- package/cjs/api/TreeApi.js +43 -20
- package/cjs/api/TreeApi.js.map +1 -1
- package/cjs/api/TreeApi.test.js.map +1 -1
- package/cjs/api/cloud/EnvInfoApi.js +10 -6
- package/cjs/api/cloud/EnvInfoApi.js.map +1 -1
- package/cjs/api/cloud/FeatureApi.js +9 -6
- package/cjs/api/cloud/FeatureApi.js.map +1 -1
- package/cjs/api/cloud/LogApi.js +48 -18
- package/cjs/api/cloud/LogApi.js.map +1 -1
- package/cjs/api/cloud/SecretsApi.js +109 -35
- package/cjs/api/cloud/SecretsApi.js.map +1 -1
- package/cjs/api/cloud/SecretsApi.test.js.map +1 -1
- package/cjs/api/cloud/StartupApi.js +21 -10
- package/cjs/api/cloud/StartupApi.js.map +1 -1
- package/cjs/api/cloud/StartupApi.test.js.map +1 -1
- package/cjs/api/cloud/VariablesApi.js +52 -20
- package/cjs/api/cloud/VariablesApi.js.map +1 -1
- package/cjs/api/cloud/VariablesApi.test.js.map +1 -1
- package/cjs/api/utils/ApiUtils.js +2 -5
- package/cjs/api/utils/ApiUtils.js.map +1 -1
- package/cjs/api/utils/ApiUtils.test.js.map +1 -1
- package/cjs/index.js +22 -17
- package/cjs/index.js.map +1 -1
- package/cjs/lib/FrodoLib.js +142 -0
- package/cjs/lib/FrodoLib.js.map +1 -0
- package/cjs/ops/AdminOps.js +578 -90
- package/cjs/ops/AdminOps.js.map +1 -1
- package/cjs/ops/AgentOps.js +956 -118
- package/cjs/ops/AgentOps.js.map +1 -1
- package/cjs/ops/AgentOps.test.js.map +1 -1
- package/cjs/ops/AuthenticateOps.js +155 -87
- package/cjs/ops/AuthenticateOps.js.map +1 -1
- package/cjs/ops/AuthenticateOps.test.js.map +1 -1
- package/cjs/ops/CirclesOfTrustOps.js +334 -291
- package/cjs/ops/CirclesOfTrustOps.js.map +1 -1
- package/cjs/ops/ConnectionProfileOps.js +241 -46
- package/cjs/ops/ConnectionProfileOps.js.map +1 -1
- package/cjs/ops/ConnectionProfileOps.test.js.map +1 -1
- package/cjs/ops/EmailTemplateOps.js +84 -10
- package/cjs/ops/EmailTemplateOps.js.map +1 -1
- package/cjs/ops/EmailTemplateOps.test.js.map +1 -1
- package/cjs/ops/IdmOps.js +97 -81
- package/cjs/ops/IdmOps.js.map +1 -1
- package/cjs/ops/IdmOps.test.js.map +1 -1
- package/cjs/ops/IdpOps.js +275 -42
- package/cjs/ops/IdpOps.js.map +1 -1
- package/cjs/ops/IdpOps.test.js.map +1 -1
- package/cjs/ops/InfoOps.js +42 -27
- package/cjs/ops/InfoOps.js.map +1 -1
- package/cjs/ops/JoseOps.test.js.map +1 -1
- package/cjs/ops/JourneyOps.js +721 -126
- package/cjs/ops/JourneyOps.js.map +1 -1
- package/cjs/ops/JourneyOps.test.js.map +1 -1
- package/cjs/ops/ManagedObjectOps.js +79 -12
- package/cjs/ops/ManagedObjectOps.js.map +1 -1
- package/cjs/ops/NodeOps.js +127 -100
- package/cjs/ops/NodeOps.js.map +1 -1
- package/cjs/ops/OAuth2ClientOps.js +323 -65
- package/cjs/ops/OAuth2ClientOps.js.map +1 -1
- package/cjs/ops/OAuth2ClientOps.test.js.map +1 -1
- package/cjs/ops/OAuth2ProviderOps.js +20 -13
- package/cjs/ops/OAuth2ProviderOps.js.map +1 -1
- package/cjs/ops/OpsTypes.js.map +1 -1
- package/cjs/ops/OrganizationOps.js +67 -12
- package/cjs/ops/OrganizationOps.js.map +1 -1
- package/cjs/ops/PolicyOps.js +476 -136
- package/cjs/ops/PolicyOps.js.map +1 -1
- package/cjs/ops/PolicyOps.test.js.map +1 -1
- package/cjs/ops/PolicySetOps.js +402 -132
- package/cjs/ops/PolicySetOps.js.map +1 -1
- package/cjs/ops/PolicySetOps.test.js.map +1 -1
- package/cjs/ops/RealmOps.js +119 -84
- package/cjs/ops/RealmOps.js.map +1 -1
- package/cjs/ops/ResourceTypeOps.js +348 -95
- package/cjs/ops/ResourceTypeOps.js.map +1 -1
- package/cjs/ops/ResourceTypeOps.test.js.map +1 -1
- package/cjs/ops/Saml2Ops.js +407 -145
- package/cjs/ops/Saml2Ops.js.map +1 -1
- package/cjs/ops/Saml2Ops.test.js.map +1 -1
- package/cjs/ops/ScriptOps.js +256 -79
- package/cjs/ops/ScriptOps.js.map +1 -1
- package/cjs/ops/ScriptOps.test.js.map +1 -1
- package/cjs/ops/ServiceOps.js +328 -55
- package/cjs/ops/ServiceOps.js.map +1 -1
- package/cjs/ops/ThemeOps.js +349 -54
- package/cjs/ops/ThemeOps.js.map +1 -1
- package/cjs/ops/ThemeOps.test.js.map +1 -1
- package/cjs/ops/cloud/FeatureOps.js +57 -12
- package/cjs/ops/cloud/FeatureOps.js.map +1 -1
- package/cjs/ops/cloud/LogOps.js +136 -6
- package/cjs/ops/cloud/LogOps.js.map +1 -1
- package/cjs/ops/cloud/SecretsOps.js +230 -289
- package/cjs/ops/cloud/SecretsOps.js.map +1 -1
- package/cjs/ops/cloud/ServiceAccountOps.js +101 -18
- package/cjs/ops/cloud/ServiceAccountOps.js.map +1 -1
- package/cjs/ops/cloud/ServiceAccountOps.test.js.map +1 -1
- package/cjs/ops/cloud/StartupOps.js +64 -9
- package/cjs/ops/cloud/StartupOps.js.map +1 -1
- package/cjs/ops/cloud/VariablesOps.js +100 -175
- package/cjs/ops/cloud/VariablesOps.js.map +1 -1
- package/cjs/ops/utils/Console.js +9 -10
- package/cjs/ops/utils/Console.js.map +1 -1
- package/cjs/ops/utils/DataProtection.js +2 -2
- package/cjs/ops/utils/DataProtection.js.map +1 -1
- package/cjs/ops/utils/ExportImportUtils.js +35 -13
- package/cjs/ops/utils/ExportImportUtils.js.map +1 -1
- package/cjs/ops/utils/OpsUtils.js +7 -5
- package/cjs/ops/utils/OpsUtils.js.map +1 -1
- package/cjs/ops/utils/OpsUtils.test.js.map +1 -1
- package/cjs/ops/utils/{ValidationUtils.js → ScriptValidationUtils.js} +1 -1
- package/cjs/ops/utils/ScriptValidationUtils.js.map +1 -0
- package/cjs/ops/utils/ScriptValidationUtils.test.js.map +1 -0
- package/cjs/ops/utils/Version.js +9 -2
- package/cjs/ops/utils/Version.js.map +1 -1
- package/cjs/shared/State.js +455 -210
- package/cjs/shared/State.js.map +1 -1
- package/cjs/shared/State.test.js.map +1 -1
- package/cjs/utils/AutoSetupPolly.js +4 -1
- package/cjs/utils/AutoSetupPolly.js.map +1 -1
- package/esm/api/AgentApi.mjs +75 -27
- package/esm/api/AgentApi.test.mjs +319 -71
- package/esm/api/AuthenticateApi.mjs +15 -4
- package/esm/api/AuthenticateApi.test.mjs +27 -8
- package/esm/api/BaseApi.mjs +43 -19
- package/esm/api/CirclesOfTrustApi.mjs +39 -17
- package/esm/api/IdmConfigApi.mjs +44 -13
- package/esm/api/IdmSystemApi.mjs +7 -3
- package/esm/api/ManagedObjectApi.mjs +44 -20
- package/esm/api/NodeApi.mjs +59 -24
- package/esm/api/NodeApi.test.mjs +158 -40
- package/esm/api/OAuth2ClientApi.mjs +36 -15
- package/esm/api/OAuth2OIDCApi.mjs +69 -20
- package/esm/api/OAuth2OIDCApi.test.mjs +21 -3
- package/esm/api/OAuth2ProviderApi.mjs +8 -6
- package/esm/api/PoliciesApi.mjs +45 -16
- package/esm/api/PoliciesApi.test.mjs +63 -15
- package/esm/api/PolicySetApi.mjs +44 -16
- package/esm/api/PolicySetApi.test.mjs +48 -12
- package/esm/api/RealmApi.mjs +65 -24
- package/esm/api/ResourceTypesApi.mjs +56 -21
- package/esm/api/ResourceTypesApi.test.mjs +58 -14
- package/esm/api/Saml2Api.mjs +75 -89
- package/esm/api/ScriptApi.mjs +45 -17
- package/esm/api/ServerInfoApi.mjs +19 -6
- package/esm/api/ServiceApi.mjs +77 -26
- package/esm/api/SocialIdentityProvidersApi.mjs +58 -23
- package/esm/api/TreeApi.mjs +36 -15
- package/esm/api/TreeApi.test.mjs +129 -34
- package/esm/api/cloud/EnvInfoApi.mjs +8 -3
- package/esm/api/cloud/FeatureApi.mjs +7 -3
- package/esm/api/cloud/LogApi.mjs +38 -11
- package/esm/api/cloud/SecretsApi.mjs +89 -21
- package/esm/api/cloud/SecretsApi.test.mjs +193 -50
- package/esm/api/cloud/StartupApi.mjs +17 -6
- package/esm/api/cloud/StartupApi.test.mjs +28 -11
- package/esm/api/cloud/VariablesApi.mjs +43 -14
- package/esm/api/cloud/VariablesApi.test.mjs +124 -33
- package/esm/api/utils/ApiUtils.mjs +2 -4
- package/esm/api/utils/ApiUtils.test.mjs +14 -6
- package/esm/index.mjs +3 -4
- package/esm/lib/FrodoLib.mjs +127 -0
- package/esm/ops/AdminOps.mjs +500 -71
- package/esm/ops/AgentOps.mjs +773 -81
- package/esm/ops/AgentOps.test.mjs +296 -113
- package/esm/ops/AuthenticateOps.mjs +136 -64
- package/esm/ops/AuthenticateOps.test.mjs +7 -4
- package/esm/ops/CirclesOfTrustOps.mjs +278 -229
- package/esm/ops/ConnectionProfileOps.mjs +206 -35
- package/esm/ops/ConnectionProfileOps.test.mjs +25 -5
- package/esm/ops/EmailTemplateOps.mjs +66 -6
- package/esm/ops/EmailTemplateOps.test.mjs +32 -11
- package/esm/ops/IdmOps.mjs +60 -47
- package/esm/ops/IdmOps.test.mjs +54 -18
- package/esm/ops/IdpOps.mjs +227 -31
- package/esm/ops/IdpOps.test.mjs +57 -20
- package/esm/ops/InfoOps.mjs +36 -23
- package/esm/ops/JoseOps.test.mjs +8 -0
- package/esm/ops/JourneyOps.mjs +634 -96
- package/esm/ops/JourneyOps.test.mjs +73 -31
- package/esm/ops/ManagedObjectOps.mjs +66 -10
- package/esm/ops/NodeOps.mjs +108 -85
- package/esm/ops/OAuth2ClientOps.mjs +258 -42
- package/esm/ops/OAuth2ClientOps.test.mjs +80 -29
- package/esm/ops/OAuth2ProviderOps.mjs +11 -8
- package/esm/ops/OrganizationOps.mjs +56 -8
- package/esm/ops/PolicyOps.mjs +379 -93
- package/esm/ops/PolicyOps.test.mjs +180 -65
- package/esm/ops/PolicySetOps.mjs +311 -88
- package/esm/ops/PolicySetOps.test.mjs +108 -39
- package/esm/ops/RealmOps.mjs +85 -65
- package/esm/ops/ResourceTypeOps.mjs +268 -61
- package/esm/ops/ResourceTypeOps.test.mjs +113 -27
- package/esm/ops/Saml2Ops.mjs +346 -106
- package/esm/ops/Saml2Ops.test.mjs +117 -81
- package/esm/ops/ScriptOps.mjs +202 -56
- package/esm/ops/ScriptOps.test.mjs +64 -23
- package/esm/ops/ServiceOps.mjs +258 -27
- package/esm/ops/ThemeOps.mjs +300 -33
- package/esm/ops/ThemeOps.test.mjs +197 -47
- package/esm/ops/cloud/FeatureOps.mjs +45 -10
- package/esm/ops/cloud/LogOps.mjs +117 -4
- package/esm/ops/cloud/SecretsOps.mjs +123 -204
- package/esm/ops/cloud/ServiceAccountOps.mjs +85 -15
- package/esm/ops/cloud/ServiceAccountOps.test.mjs +16 -6
- package/esm/ops/cloud/StartupOps.mjs +49 -6
- package/esm/ops/cloud/VariablesOps.mjs +58 -120
- package/esm/ops/utils/Console.mjs +9 -8
- package/esm/ops/utils/DataProtection.mjs +2 -3
- package/esm/ops/utils/ExportImportUtils.mjs +28 -8
- package/esm/ops/utils/OpsUtils.mjs +4 -3
- package/esm/ops/utils/OpsUtils.test.mjs +21 -5
- package/esm/ops/utils/{ValidationUtils.mjs → ScriptValidationUtils.mjs} +1 -1
- package/esm/ops/utils/{ValidationUtils.test.mjs → ScriptValidationUtils.test.mjs} +2 -2
- package/esm/ops/utils/Version.mjs +8 -2
- package/esm/shared/State.mjs +459 -145
- package/esm/shared/State.test.mjs +8 -0
- package/esm/utils/AutoSetupPolly.mjs +4 -1
- package/package.json +1 -1
- package/types/api/AgentApi.d.ts +37 -8
- package/types/api/AgentApi.d.ts.map +1 -1
- package/types/api/ApiTypes.d.ts +12 -0
- package/types/api/ApiTypes.d.ts.map +1 -1
- package/types/api/AuthenticateApi.d.ts +13 -3
- package/types/api/AuthenticateApi.d.ts.map +1 -1
- package/types/api/BaseApi.d.ts +36 -7
- package/types/api/BaseApi.d.ts.map +1 -1
- package/types/api/CirclesOfTrustApi.d.ts +21 -7
- package/types/api/CirclesOfTrustApi.d.ts.map +1 -1
- package/types/api/IdmConfigApi.d.ts +28 -13
- package/types/api/IdmConfigApi.d.ts.map +1 -1
- package/types/api/IdmSystemApi.d.ts +4 -1
- package/types/api/IdmSystemApi.d.ts.map +1 -1
- package/types/api/ManagedObjectApi.d.ts +25 -10
- package/types/api/ManagedObjectApi.d.ts.map +1 -1
- package/types/api/NodeApi.d.ts +31 -9
- package/types/api/NodeApi.d.ts.map +1 -1
- package/types/api/OAuth2ClientApi.d.ts +18 -5
- package/types/api/OAuth2ClientApi.d.ts.map +1 -1
- package/types/api/OAuth2OIDCApi.d.ts +45 -11
- package/types/api/OAuth2OIDCApi.d.ts.map +1 -1
- package/types/api/OAuth2ProviderApi.d.ts +4 -1
- package/types/api/OAuth2ProviderApi.d.ts.map +1 -1
- package/types/api/PoliciesApi.d.ts +21 -5
- package/types/api/PoliciesApi.d.ts.map +1 -1
- package/types/api/PolicySetApi.d.ts +20 -5
- package/types/api/PolicySetApi.d.ts.map +1 -1
- package/types/api/RealmApi.d.ts +26 -10
- package/types/api/RealmApi.d.ts.map +1 -1
- package/types/api/ResourceTypesApi.d.ts +27 -8
- package/types/api/ResourceTypesApi.d.ts.map +1 -1
- package/types/api/Saml2Api.d.ts +39 -32
- package/types/api/Saml2Api.d.ts.map +1 -1
- package/types/api/ScriptApi.d.ts +21 -5
- package/types/api/ScriptApi.d.ts.map +1 -1
- package/types/api/ServerInfoApi.d.ts +9 -2
- package/types/api/ServerInfoApi.d.ts.map +1 -1
- package/types/api/ServiceApi.d.ts +41 -7
- package/types/api/ServiceApi.d.ts.map +1 -1
- package/types/api/SocialIdentityProvidersApi.d.ts +30 -8
- package/types/api/SocialIdentityProvidersApi.d.ts.map +1 -1
- package/types/api/TreeApi.d.ts +18 -4
- package/types/api/TreeApi.d.ts.map +1 -1
- package/types/api/cloud/EnvInfoApi.d.ts +4 -1
- package/types/api/cloud/EnvInfoApi.d.ts.map +1 -1
- package/types/api/cloud/FeatureApi.d.ts +4 -1
- package/types/api/cloud/FeatureApi.d.ts.map +1 -1
- package/types/api/cloud/LogApi.d.ts +24 -6
- package/types/api/cloud/LogApi.d.ts.map +1 -1
- package/types/api/cloud/SecretsApi.d.ts +50 -10
- package/types/api/cloud/SecretsApi.d.ts.map +1 -1
- package/types/api/cloud/StartupApi.d.ts +7 -2
- package/types/api/cloud/StartupApi.d.ts.map +1 -1
- package/types/api/cloud/VariablesApi.d.ts +23 -5
- package/types/api/cloud/VariablesApi.d.ts.map +1 -1
- package/types/api/utils/ApiUtils.d.ts +3 -2
- package/types/api/utils/ApiUtils.d.ts.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/types/lib/FrodoLib.d.ts +95 -0
- package/types/lib/FrodoLib.d.ts.map +1 -0
- package/types/ops/AdminOps.d.ts +71 -12
- package/types/ops/AdminOps.d.ts.map +1 -1
- package/types/ops/AgentOps.d.ts +345 -36
- package/types/ops/AgentOps.d.ts.map +1 -1
- package/types/ops/AuthenticateOps.d.ts +18 -5
- package/types/ops/AuthenticateOps.d.ts.map +1 -1
- package/types/ops/CirclesOfTrustOps.d.ts +76 -26
- package/types/ops/CirclesOfTrustOps.d.ts.map +1 -1
- package/types/ops/ConnectionProfileOps.d.ts +88 -9
- package/types/ops/ConnectionProfileOps.d.ts.map +1 -1
- package/types/ops/EmailTemplateOps.d.ts +36 -3
- package/types/ops/EmailTemplateOps.d.ts.map +1 -1
- package/types/ops/IdmOps.d.ts +28 -40
- package/types/ops/IdmOps.d.ts.map +1 -1
- package/types/ops/IdpOps.d.ts +88 -10
- package/types/ops/IdpOps.d.ts.map +1 -1
- package/types/ops/InfoOps.d.ts +12 -1
- package/types/ops/InfoOps.d.ts.map +1 -1
- package/types/ops/JourneyOps.d.ts +237 -34
- package/types/ops/JourneyOps.d.ts.map +1 -1
- package/types/ops/ManagedObjectOps.d.ts +37 -8
- package/types/ops/ManagedObjectOps.d.ts.map +1 -1
- package/types/ops/NodeOps.d.ts +61 -6
- package/types/ops/NodeOps.d.ts.map +1 -1
- package/types/ops/OAuth2ClientOps.d.ts +104 -10
- package/types/ops/OAuth2ClientOps.d.ts.map +1 -1
- package/types/ops/OAuth2ProviderOps.d.ts +8 -5
- package/types/ops/OAuth2ProviderOps.d.ts.map +1 -1
- package/types/ops/OpsTypes.d.ts +12 -1
- package/types/ops/OpsTypes.d.ts.map +1 -1
- package/types/ops/OrganizationOps.d.ts +24 -3
- package/types/ops/OrganizationOps.d.ts.map +1 -1
- package/types/ops/PolicyOps.d.ts +103 -28
- package/types/ops/PolicyOps.d.ts.map +1 -1
- package/types/ops/PolicySetOps.d.ts +76 -30
- package/types/ops/PolicySetOps.d.ts.map +1 -1
- package/types/ops/RealmOps.d.ts +34 -14
- package/types/ops/RealmOps.d.ts.map +1 -1
- package/types/ops/ResourceTypeOps.d.ts +116 -29
- package/types/ops/ResourceTypeOps.d.ts.map +1 -1
- package/types/ops/Saml2Ops.d.ts +124 -41
- package/types/ops/Saml2Ops.d.ts.map +1 -1
- package/types/ops/ScriptOps.d.ts +88 -23
- package/types/ops/ScriptOps.d.ts.map +1 -1
- package/types/ops/ServiceOps.d.ts +94 -8
- package/types/ops/ServiceOps.d.ts.map +1 -1
- package/types/ops/ThemeOps.d.ts +113 -9
- package/types/ops/ThemeOps.d.ts.map +1 -1
- package/types/ops/cloud/FeatureOps.d.ts +23 -2
- package/types/ops/cloud/FeatureOps.d.ts.map +1 -1
- package/types/ops/cloud/LogOps.d.ts +61 -3
- package/types/ops/cloud/LogOps.d.ts.map +1 -1
- package/types/ops/cloud/SecretsOps.d.ts +77 -63
- package/types/ops/cloud/SecretsOps.d.ts.map +1 -1
- package/types/ops/cloud/ServiceAccountOps.d.ts +48 -3
- package/types/ops/cloud/ServiceAccountOps.d.ts.map +1 -1
- package/types/ops/cloud/StartupOps.d.ts +25 -2
- package/types/ops/cloud/StartupOps.d.ts.map +1 -1
- package/types/ops/cloud/VariablesOps.d.ts +39 -39
- package/types/ops/cloud/VariablesOps.d.ts.map +1 -1
- package/types/ops/utils/Console.d.ts.map +1 -1
- package/types/ops/utils/DataProtection.d.ts +1 -1
- package/types/ops/utils/DataProtection.d.ts.map +1 -1
- package/types/ops/utils/ExportImportUtils.d.ts +29 -11
- package/types/ops/utils/ExportImportUtils.d.ts.map +1 -1
- package/types/ops/utils/OpsUtils.d.ts +4 -1
- package/types/ops/utils/OpsUtils.d.ts.map +1 -1
- package/types/ops/utils/ScriptValidationUtils.d.ts.map +1 -0
- package/types/ops/utils/Version.d.ts +5 -1
- package/types/ops/utils/Version.d.ts.map +1 -1
- package/types/shared/State.d.ts +80 -177
- package/types/shared/State.d.ts.map +1 -1
- package/types/utils/AutoSetupPolly.d.ts.map +1 -1
- package/cjs/ops/utils/ValidationUtils.js.map +0 -1
- package/cjs/ops/utils/ValidationUtils.test.js.map +0 -1
- package/types/ops/utils/ValidationUtils.d.ts.map +0 -1
- /package/types/ops/utils/{ValidationUtils.d.ts → ScriptValidationUtils.d.ts} +0 -0
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
* Note: FRODO_DEBUG=1 is optional and enables debug logging for some output
|
|
30
30
|
* in case things don't function as expected
|
|
31
31
|
*/
|
|
32
|
-
import
|
|
32
|
+
import * as AgentApi from './AgentApi';
|
|
33
|
+
import { state } from '../index';
|
|
33
34
|
import { getAgent } from '../test/mocks/ForgeRockApiMockEngine';
|
|
34
35
|
import { autoSetupPolly } from '../utils/AutoSetupPolly';
|
|
35
36
|
autoSetupPolly();
|
|
@@ -75,80 +76,182 @@ describe('AgentApi', () => {
|
|
|
75
76
|
if (process.env.FRODO_POLLY_MODE === 'record') {
|
|
76
77
|
// setup gateway1 - delete if exists, then create
|
|
77
78
|
try {
|
|
78
|
-
await
|
|
79
|
-
|
|
79
|
+
await AgentApi.getAgentByTypeAndId({
|
|
80
|
+
agentType: gateway1.type,
|
|
81
|
+
agentId: gateway1.id,
|
|
82
|
+
state
|
|
83
|
+
});
|
|
84
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
85
|
+
agentType: gateway1.type,
|
|
86
|
+
agentId: gateway1.id,
|
|
87
|
+
state
|
|
88
|
+
});
|
|
80
89
|
} catch (error) {
|
|
81
90
|
// ignore
|
|
82
91
|
} finally {
|
|
83
|
-
await
|
|
92
|
+
await AgentApi.putAgentByTypeAndId({
|
|
93
|
+
agentType: gateway1.type,
|
|
94
|
+
agentId: gateway1.id,
|
|
95
|
+
agentData: getAgent(gateway1.type, gateway1.id),
|
|
96
|
+
state
|
|
97
|
+
});
|
|
84
98
|
}
|
|
85
99
|
// setup gateway2 - delete if exists
|
|
86
100
|
try {
|
|
87
|
-
await
|
|
88
|
-
|
|
101
|
+
await AgentApi.getAgentByTypeAndId({
|
|
102
|
+
agentType: gateway2.type,
|
|
103
|
+
agentId: gateway2.id,
|
|
104
|
+
state
|
|
105
|
+
});
|
|
106
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
107
|
+
agentType: gateway2.type,
|
|
108
|
+
agentId: gateway2.id,
|
|
109
|
+
state
|
|
110
|
+
});
|
|
89
111
|
} catch (error) {
|
|
90
112
|
// ignore
|
|
91
113
|
}
|
|
92
114
|
// setup gateway3 - delete if exists, then create
|
|
93
115
|
try {
|
|
94
|
-
await
|
|
95
|
-
|
|
116
|
+
await AgentApi.getAgentByTypeAndId({
|
|
117
|
+
agentType: gateway3.type,
|
|
118
|
+
agentId: gateway3.id,
|
|
119
|
+
state
|
|
120
|
+
});
|
|
121
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
122
|
+
agentType: gateway3.type,
|
|
123
|
+
agentId: gateway3.id,
|
|
124
|
+
state
|
|
125
|
+
});
|
|
96
126
|
} catch (error) {
|
|
97
127
|
// ignore
|
|
98
128
|
} finally {
|
|
99
|
-
await
|
|
129
|
+
await AgentApi.putAgentByTypeAndId({
|
|
130
|
+
agentType: gateway3.type,
|
|
131
|
+
agentId: gateway3.id,
|
|
132
|
+
agentData: getAgent(gateway3.type, gateway3.id),
|
|
133
|
+
state
|
|
134
|
+
});
|
|
100
135
|
}
|
|
101
136
|
|
|
102
137
|
// setup java1 - delete if exists, then create
|
|
103
138
|
try {
|
|
104
|
-
await
|
|
105
|
-
|
|
139
|
+
await AgentApi.getAgentByTypeAndId({
|
|
140
|
+
agentType: java1.type,
|
|
141
|
+
agentId: java1.id,
|
|
142
|
+
state
|
|
143
|
+
});
|
|
144
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
145
|
+
agentType: java1.type,
|
|
146
|
+
agentId: java1.id,
|
|
147
|
+
state
|
|
148
|
+
});
|
|
106
149
|
} catch (error) {
|
|
107
150
|
// ignore
|
|
108
151
|
} finally {
|
|
109
|
-
await
|
|
152
|
+
await AgentApi.putAgentByTypeAndId({
|
|
153
|
+
agentType: java1.type,
|
|
154
|
+
agentId: java1.id,
|
|
155
|
+
agentData: getAgent(java1.type, java1.id),
|
|
156
|
+
state
|
|
157
|
+
});
|
|
110
158
|
}
|
|
111
159
|
// setup java2 - delete if exists
|
|
112
160
|
try {
|
|
113
|
-
await
|
|
114
|
-
|
|
161
|
+
await AgentApi.getAgentByTypeAndId({
|
|
162
|
+
agentType: java2.type,
|
|
163
|
+
agentId: java2.id,
|
|
164
|
+
state
|
|
165
|
+
});
|
|
166
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
167
|
+
agentType: java2.type,
|
|
168
|
+
agentId: java2.id,
|
|
169
|
+
state
|
|
170
|
+
});
|
|
115
171
|
} catch (error) {
|
|
116
172
|
// ignore
|
|
117
173
|
}
|
|
118
174
|
// setup java3 - delete if exists, then create
|
|
119
175
|
try {
|
|
120
|
-
await
|
|
121
|
-
|
|
176
|
+
await AgentApi.getAgentByTypeAndId({
|
|
177
|
+
agentType: java3.type,
|
|
178
|
+
agentId: java3.id,
|
|
179
|
+
state
|
|
180
|
+
});
|
|
181
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
182
|
+
agentType: java3.type,
|
|
183
|
+
agentId: java3.id,
|
|
184
|
+
state
|
|
185
|
+
});
|
|
122
186
|
} catch (error) {
|
|
123
187
|
// ignore
|
|
124
188
|
} finally {
|
|
125
|
-
await
|
|
189
|
+
await AgentApi.putAgentByTypeAndId({
|
|
190
|
+
agentType: java3.type,
|
|
191
|
+
agentId: java3.id,
|
|
192
|
+
agentData: getAgent(java3.type, java3.id),
|
|
193
|
+
state
|
|
194
|
+
});
|
|
126
195
|
}
|
|
127
196
|
|
|
128
197
|
// setup web1 - delete if exists, then create
|
|
129
198
|
try {
|
|
130
|
-
await
|
|
131
|
-
|
|
199
|
+
await AgentApi.getAgentByTypeAndId({
|
|
200
|
+
agentType: web1.type,
|
|
201
|
+
agentId: web1.id,
|
|
202
|
+
state
|
|
203
|
+
});
|
|
204
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
205
|
+
agentType: web1.type,
|
|
206
|
+
agentId: web1.id,
|
|
207
|
+
state
|
|
208
|
+
});
|
|
132
209
|
} catch (error) {
|
|
133
210
|
// ignore
|
|
134
211
|
} finally {
|
|
135
|
-
await
|
|
212
|
+
await AgentApi.putAgentByTypeAndId({
|
|
213
|
+
agentType: web1.type,
|
|
214
|
+
agentId: web1.id,
|
|
215
|
+
agentData: getAgent(web1.type, web1.id),
|
|
216
|
+
state
|
|
217
|
+
});
|
|
136
218
|
}
|
|
137
219
|
// setup web2 - delete if exists
|
|
138
220
|
try {
|
|
139
|
-
await
|
|
140
|
-
|
|
221
|
+
await AgentApi.getAgentByTypeAndId({
|
|
222
|
+
agentType: web2.type,
|
|
223
|
+
agentId: web2.id,
|
|
224
|
+
state
|
|
225
|
+
});
|
|
226
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
227
|
+
agentType: web2.type,
|
|
228
|
+
agentId: web2.id,
|
|
229
|
+
state
|
|
230
|
+
});
|
|
141
231
|
} catch (error) {
|
|
142
232
|
// ignore
|
|
143
233
|
}
|
|
144
234
|
// setup web3 - delete if exists, then create
|
|
145
235
|
try {
|
|
146
|
-
await
|
|
147
|
-
|
|
236
|
+
await AgentApi.getAgentByTypeAndId({
|
|
237
|
+
agentType: web3.type,
|
|
238
|
+
agentId: web3.id,
|
|
239
|
+
state
|
|
240
|
+
});
|
|
241
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
242
|
+
agentType: web3.type,
|
|
243
|
+
agentId: web3.id,
|
|
244
|
+
state
|
|
245
|
+
});
|
|
148
246
|
} catch (error) {
|
|
149
247
|
// ignore
|
|
150
248
|
} finally {
|
|
151
|
-
await
|
|
249
|
+
await AgentApi.putAgentByTypeAndId({
|
|
250
|
+
agentType: web3.type,
|
|
251
|
+
agentId: web3.id,
|
|
252
|
+
agentData: getAgent(web3.type, web3.id),
|
|
253
|
+
state
|
|
254
|
+
});
|
|
152
255
|
}
|
|
153
256
|
}
|
|
154
257
|
});
|
|
@@ -156,56 +259,128 @@ describe('AgentApi', () => {
|
|
|
156
259
|
afterAll(async () => {
|
|
157
260
|
if (process.env.FRODO_POLLY_MODE === 'record') {
|
|
158
261
|
try {
|
|
159
|
-
await
|
|
160
|
-
|
|
262
|
+
await AgentApi.getAgentByTypeAndId({
|
|
263
|
+
agentType: gateway1.type,
|
|
264
|
+
agentId: gateway1.id,
|
|
265
|
+
state
|
|
266
|
+
});
|
|
267
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
268
|
+
agentType: gateway1.type,
|
|
269
|
+
agentId: gateway1.id,
|
|
270
|
+
state
|
|
271
|
+
});
|
|
161
272
|
} catch (error) {
|
|
162
273
|
// ignore
|
|
163
274
|
}
|
|
164
275
|
try {
|
|
165
|
-
await
|
|
166
|
-
|
|
276
|
+
await AgentApi.getAgentByTypeAndId({
|
|
277
|
+
agentType: gateway2.type,
|
|
278
|
+
agentId: gateway2.id,
|
|
279
|
+
state
|
|
280
|
+
});
|
|
281
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
282
|
+
agentType: gateway2.type,
|
|
283
|
+
agentId: gateway2.id,
|
|
284
|
+
state
|
|
285
|
+
});
|
|
167
286
|
} catch (error) {
|
|
168
287
|
// ignore
|
|
169
288
|
}
|
|
170
289
|
try {
|
|
171
|
-
await
|
|
172
|
-
|
|
290
|
+
await AgentApi.getAgentByTypeAndId({
|
|
291
|
+
agentType: gateway3.type,
|
|
292
|
+
agentId: gateway3.id,
|
|
293
|
+
state
|
|
294
|
+
});
|
|
295
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
296
|
+
agentType: gateway3.type,
|
|
297
|
+
agentId: gateway3.id,
|
|
298
|
+
state
|
|
299
|
+
});
|
|
173
300
|
} catch (error) {
|
|
174
301
|
// ignore
|
|
175
302
|
}
|
|
176
303
|
try {
|
|
177
|
-
await
|
|
178
|
-
|
|
304
|
+
await AgentApi.getAgentByTypeAndId({
|
|
305
|
+
agentType: java1.type,
|
|
306
|
+
agentId: java1.id,
|
|
307
|
+
state
|
|
308
|
+
});
|
|
309
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
310
|
+
agentType: java1.type,
|
|
311
|
+
agentId: java1.id,
|
|
312
|
+
state
|
|
313
|
+
});
|
|
179
314
|
} catch (error) {
|
|
180
315
|
// ignore
|
|
181
316
|
}
|
|
182
317
|
try {
|
|
183
|
-
await
|
|
184
|
-
|
|
318
|
+
await AgentApi.getAgentByTypeAndId({
|
|
319
|
+
agentType: java2.type,
|
|
320
|
+
agentId: java2.id,
|
|
321
|
+
state
|
|
322
|
+
});
|
|
323
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
324
|
+
agentType: java2.type,
|
|
325
|
+
agentId: java2.id,
|
|
326
|
+
state
|
|
327
|
+
});
|
|
185
328
|
} catch (error) {
|
|
186
329
|
// ignore
|
|
187
330
|
}
|
|
188
331
|
try {
|
|
189
|
-
await
|
|
190
|
-
|
|
332
|
+
await AgentApi.getAgentByTypeAndId({
|
|
333
|
+
agentType: java3.type,
|
|
334
|
+
agentId: java3.id,
|
|
335
|
+
state
|
|
336
|
+
});
|
|
337
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
338
|
+
agentType: java3.type,
|
|
339
|
+
agentId: java3.id,
|
|
340
|
+
state
|
|
341
|
+
});
|
|
191
342
|
} catch (error) {
|
|
192
343
|
// ignore
|
|
193
344
|
}
|
|
194
345
|
try {
|
|
195
|
-
await
|
|
196
|
-
|
|
346
|
+
await AgentApi.getAgentByTypeAndId({
|
|
347
|
+
agentType: web1.type,
|
|
348
|
+
agentId: web1.id,
|
|
349
|
+
state
|
|
350
|
+
});
|
|
351
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
352
|
+
agentType: web1.type,
|
|
353
|
+
agentId: web1.id,
|
|
354
|
+
state
|
|
355
|
+
});
|
|
197
356
|
} catch (error) {
|
|
198
357
|
// ignore
|
|
199
358
|
}
|
|
200
359
|
try {
|
|
201
|
-
await
|
|
202
|
-
|
|
360
|
+
await AgentApi.getAgentByTypeAndId({
|
|
361
|
+
agentType: web2.type,
|
|
362
|
+
agentId: web2.id,
|
|
363
|
+
state
|
|
364
|
+
});
|
|
365
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
366
|
+
agentType: web2.type,
|
|
367
|
+
agentId: web2.id,
|
|
368
|
+
state
|
|
369
|
+
});
|
|
203
370
|
} catch (error) {
|
|
204
371
|
// ignore
|
|
205
372
|
}
|
|
206
373
|
try {
|
|
207
|
-
await
|
|
208
|
-
|
|
374
|
+
await AgentApi.getAgentByTypeAndId({
|
|
375
|
+
agentType: web3.type,
|
|
376
|
+
agentId: web3.id,
|
|
377
|
+
state
|
|
378
|
+
});
|
|
379
|
+
await AgentApi.deleteAgentByTypeAndId({
|
|
380
|
+
agentType: web3.type,
|
|
381
|
+
agentId: web3.id,
|
|
382
|
+
state
|
|
383
|
+
});
|
|
209
384
|
} catch (error) {
|
|
210
385
|
// ignore
|
|
211
386
|
}
|
|
@@ -213,124 +388,197 @@ describe('AgentApi', () => {
|
|
|
213
388
|
});
|
|
214
389
|
describe('getAgentTypes()', () => {
|
|
215
390
|
test('0: Method is implemented', async () => {
|
|
216
|
-
expect(
|
|
391
|
+
expect(AgentApi.getAgentTypes).toBeDefined();
|
|
217
392
|
});
|
|
218
393
|
test('1: Get all agent types', async () => {
|
|
219
|
-
const response = await
|
|
394
|
+
const response = await AgentApi.getAgentTypes({
|
|
395
|
+
state
|
|
396
|
+
});
|
|
220
397
|
expect(response).toMatchSnapshot();
|
|
221
398
|
});
|
|
222
399
|
});
|
|
223
400
|
describe('getAgentsByType()', () => {
|
|
224
401
|
test('0: Method is implemented', async () => {
|
|
225
|
-
expect(
|
|
402
|
+
expect(AgentApi.getAgentsByType).toBeDefined();
|
|
226
403
|
});
|
|
227
404
|
test('1: Get all gateway agents', async () => {
|
|
228
405
|
const agentType = 'IdentityGatewayAgent';
|
|
229
|
-
const response = await
|
|
406
|
+
const response = await AgentApi.getAgentsByType({
|
|
407
|
+
agentType,
|
|
408
|
+
state
|
|
409
|
+
});
|
|
230
410
|
expect(response).toMatchSnapshot();
|
|
231
411
|
});
|
|
232
412
|
test('2: Get all java agents', async () => {
|
|
233
413
|
const agentType = 'J2EEAgent';
|
|
234
|
-
const response = await
|
|
414
|
+
const response = await AgentApi.getAgentsByType({
|
|
415
|
+
agentType,
|
|
416
|
+
state
|
|
417
|
+
});
|
|
235
418
|
expect(response).toMatchSnapshot();
|
|
236
419
|
});
|
|
237
420
|
test('3: Get all web agents', async () => {
|
|
238
421
|
const agentType = 'WebAgent';
|
|
239
|
-
const response = await
|
|
422
|
+
const response = await AgentApi.getAgentsByType({
|
|
423
|
+
agentType,
|
|
424
|
+
state
|
|
425
|
+
});
|
|
240
426
|
expect(response).toMatchSnapshot();
|
|
241
427
|
});
|
|
242
428
|
});
|
|
243
429
|
describe('getAgents()', () => {
|
|
244
430
|
test('0: Method is implemented', async () => {
|
|
245
|
-
expect(
|
|
431
|
+
expect(AgentApi.getAgents).toBeDefined();
|
|
246
432
|
});
|
|
247
433
|
test('1: Get all agents', async () => {
|
|
248
|
-
const response = await
|
|
434
|
+
const response = await AgentApi.getAgents({
|
|
435
|
+
state
|
|
436
|
+
});
|
|
249
437
|
expect(response).toMatchSnapshot();
|
|
250
438
|
});
|
|
251
439
|
});
|
|
252
440
|
describe('findAgentById()', () => {
|
|
253
441
|
test('0: Method is implemented', async () => {
|
|
254
|
-
expect(
|
|
442
|
+
expect(AgentApi.findAgentById).toBeDefined();
|
|
255
443
|
});
|
|
256
444
|
test(`1: Find agent '${gateway1.id}'`, async () => {
|
|
257
|
-
const response = await
|
|
445
|
+
const response = await AgentApi.findAgentById({
|
|
446
|
+
agentId: gateway1.id,
|
|
447
|
+
state
|
|
448
|
+
});
|
|
258
449
|
expect(response).toMatchSnapshot();
|
|
259
450
|
});
|
|
260
451
|
test(`2: Find agent '${java1.id}'`, async () => {
|
|
261
|
-
const response = await
|
|
452
|
+
const response = await AgentApi.findAgentById({
|
|
453
|
+
agentId: java1.id,
|
|
454
|
+
state
|
|
455
|
+
});
|
|
262
456
|
expect(response).toMatchSnapshot();
|
|
263
457
|
});
|
|
264
458
|
test(`3: Find agent '${web1.id}'`, async () => {
|
|
265
|
-
const response = await
|
|
459
|
+
const response = await AgentApi.findAgentById({
|
|
460
|
+
agentId: web1.id,
|
|
461
|
+
state
|
|
462
|
+
});
|
|
266
463
|
expect(response).toMatchSnapshot();
|
|
267
464
|
});
|
|
268
465
|
});
|
|
269
466
|
describe('findAgentByTypeAndId()', () => {
|
|
270
467
|
test('0: Method is implemented', async () => {
|
|
271
|
-
expect(
|
|
468
|
+
expect(AgentApi.findAgentByTypeAndId).toBeDefined();
|
|
272
469
|
});
|
|
273
470
|
test(`1: Find ${gateway1.type} '${gateway1.id}'`, async () => {
|
|
274
|
-
const response = await
|
|
471
|
+
const response = await AgentApi.findAgentByTypeAndId({
|
|
472
|
+
agentType: gateway1.type,
|
|
473
|
+
agentId: gateway1.id,
|
|
474
|
+
state
|
|
475
|
+
});
|
|
275
476
|
expect(response).toMatchSnapshot();
|
|
276
477
|
});
|
|
277
478
|
test(`2: Find ${java1.type} '${java1.id}'`, async () => {
|
|
278
|
-
const response = await
|
|
479
|
+
const response = await AgentApi.findAgentByTypeAndId({
|
|
480
|
+
agentType: java1.type,
|
|
481
|
+
agentId: java1.id,
|
|
482
|
+
state
|
|
483
|
+
});
|
|
279
484
|
expect(response).toMatchSnapshot();
|
|
280
485
|
});
|
|
281
486
|
test(`3: Find ${web1.type} '${web1.id}'`, async () => {
|
|
282
|
-
const response = await
|
|
487
|
+
const response = await AgentApi.findAgentByTypeAndId({
|
|
488
|
+
agentType: web1.type,
|
|
489
|
+
agentId: web1.id,
|
|
490
|
+
state
|
|
491
|
+
});
|
|
283
492
|
expect(response).toMatchSnapshot();
|
|
284
493
|
});
|
|
285
494
|
});
|
|
286
495
|
describe('getAgentByTypeAndId()', () => {
|
|
287
496
|
test('0: Method is implemented', async () => {
|
|
288
|
-
expect(
|
|
497
|
+
expect(AgentApi.getAgentByTypeAndId).toBeDefined();
|
|
289
498
|
});
|
|
290
499
|
test(`1: Get ${gateway1.type} '${gateway1.id}'`, async () => {
|
|
291
|
-
const response = await
|
|
500
|
+
const response = await AgentApi.getAgentByTypeAndId({
|
|
501
|
+
agentType: gateway1.type,
|
|
502
|
+
agentId: gateway1.id,
|
|
503
|
+
state
|
|
504
|
+
});
|
|
292
505
|
expect(response).toMatchSnapshot();
|
|
293
506
|
});
|
|
294
507
|
test(`2: Get ${java1.type} '${java1.id}'`, async () => {
|
|
295
|
-
const response = await
|
|
508
|
+
const response = await AgentApi.getAgentByTypeAndId({
|
|
509
|
+
agentType: java1.type,
|
|
510
|
+
agentId: java1.id,
|
|
511
|
+
state
|
|
512
|
+
});
|
|
296
513
|
expect(response).toMatchSnapshot();
|
|
297
514
|
});
|
|
298
515
|
test(`3: Get ${web1.type} '${web1.id}'`, async () => {
|
|
299
|
-
const response = await
|
|
516
|
+
const response = await AgentApi.getAgentByTypeAndId({
|
|
517
|
+
agentType: web1.type,
|
|
518
|
+
agentId: web1.id,
|
|
519
|
+
state
|
|
520
|
+
});
|
|
300
521
|
expect(response).toMatchSnapshot();
|
|
301
522
|
});
|
|
302
523
|
});
|
|
303
524
|
describe('putAgentByTypeAndId()', () => {
|
|
304
525
|
test('0: Method is implemented', async () => {
|
|
305
|
-
expect(
|
|
526
|
+
expect(AgentApi.putAgentByTypeAndId).toBeDefined();
|
|
306
527
|
});
|
|
307
528
|
test(`1: Put ${gateway2.type} '${gateway2.id}'`, async () => {
|
|
308
|
-
const response = await
|
|
529
|
+
const response = await AgentApi.putAgentByTypeAndId({
|
|
530
|
+
agentType: gateway2.type,
|
|
531
|
+
agentId: gateway2.id,
|
|
532
|
+
agentData: getAgent(gateway2.type, gateway2.id),
|
|
533
|
+
state
|
|
534
|
+
});
|
|
309
535
|
expect(response).toMatchSnapshot();
|
|
310
536
|
});
|
|
311
537
|
test(`2: Put ${java2.type} '${java2.id}'`, async () => {
|
|
312
|
-
const response = await
|
|
538
|
+
const response = await AgentApi.putAgentByTypeAndId({
|
|
539
|
+
agentType: java2.type,
|
|
540
|
+
agentId: java2.id,
|
|
541
|
+
agentData: getAgent(java2.type, java2.id),
|
|
542
|
+
state
|
|
543
|
+
});
|
|
313
544
|
expect(response).toMatchSnapshot();
|
|
314
545
|
});
|
|
315
546
|
test(`3: Put ${web2.type} '${web2.id}'`, async () => {
|
|
316
|
-
const response = await
|
|
547
|
+
const response = await AgentApi.putAgentByTypeAndId({
|
|
548
|
+
agentType: web2.type,
|
|
549
|
+
agentId: web2.id,
|
|
550
|
+
agentData: getAgent(web2.type, web2.id),
|
|
551
|
+
state
|
|
552
|
+
});
|
|
317
553
|
expect(response).toMatchSnapshot();
|
|
318
554
|
});
|
|
319
555
|
});
|
|
320
556
|
describe('deleteAgentByTypeAndId()', () => {
|
|
321
557
|
test('0: Method is implemented', async () => {
|
|
322
|
-
expect(
|
|
558
|
+
expect(AgentApi.deleteAgentByTypeAndId).toBeDefined();
|
|
323
559
|
});
|
|
324
560
|
test(`1: Delete ${gateway3.type} '${gateway3.id}'`, async () => {
|
|
325
|
-
const response = await
|
|
561
|
+
const response = await AgentApi.deleteAgentByTypeAndId({
|
|
562
|
+
agentType: gateway3.type,
|
|
563
|
+
agentId: gateway3.id,
|
|
564
|
+
state
|
|
565
|
+
});
|
|
326
566
|
expect(response).toMatchSnapshot();
|
|
327
567
|
});
|
|
328
568
|
test(`2: Delete ${java3.type} '${java3.id}'`, async () => {
|
|
329
|
-
const response = await
|
|
569
|
+
const response = await AgentApi.deleteAgentByTypeAndId({
|
|
570
|
+
agentType: java3.type,
|
|
571
|
+
agentId: java3.id,
|
|
572
|
+
state
|
|
573
|
+
});
|
|
330
574
|
expect(response).toMatchSnapshot();
|
|
331
575
|
});
|
|
332
576
|
test(`3: Delete ${web3.type} '${web3.id}'`, async () => {
|
|
333
|
-
const response = await
|
|
577
|
+
const response = await AgentApi.deleteAgentByTypeAndId({
|
|
578
|
+
agentType: web3.type,
|
|
579
|
+
agentId: web3.id,
|
|
580
|
+
state
|
|
581
|
+
});
|
|
334
582
|
expect(response).toMatchSnapshot();
|
|
335
583
|
});
|
|
336
584
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import util from 'util';
|
|
2
2
|
import { generateAmApi } from './BaseApi';
|
|
3
|
-
import * as state from '../shared/State';
|
|
4
3
|
import { getRealmPath } from './utils/ApiUtils';
|
|
5
4
|
const authenticateUrlTemplate = '%s/json%s/authenticate';
|
|
6
5
|
const authenticateWithServiceUrlTemplate = `${authenticateUrlTemplate}?authIndexType=service&authIndexValue=%s`;
|
|
@@ -16,7 +15,10 @@ const getApiConfig = () => ({
|
|
|
16
15
|
* @param {{ [k: string]: string | number | boolean | string[] }} map name/value map
|
|
17
16
|
* @returns filled response body so it can be used as input to another call to /authenticate
|
|
18
17
|
*/
|
|
19
|
-
export function fillCallbacks(
|
|
18
|
+
export function fillCallbacks({
|
|
19
|
+
response,
|
|
20
|
+
map
|
|
21
|
+
}) {
|
|
20
22
|
const body = JSON.parse(JSON.stringify(response));
|
|
21
23
|
for (const callback of body.callbacks) {
|
|
22
24
|
callback.input[0].value = map[callback.input[0].name];
|
|
@@ -32,11 +34,20 @@ export function fillCallbacks(response, map) {
|
|
|
32
34
|
* @param {string} service name of authentication service/journey
|
|
33
35
|
* @returns Promise resolving to the authentication service response
|
|
34
36
|
*/
|
|
35
|
-
export async function step(
|
|
37
|
+
export async function step({
|
|
38
|
+
body = {},
|
|
39
|
+
config = {},
|
|
40
|
+
realm = '/',
|
|
41
|
+
service = undefined,
|
|
42
|
+
state
|
|
43
|
+
}) {
|
|
36
44
|
const urlString = service || state.getAuthenticationService() ? util.format(authenticateWithServiceUrlTemplate, state.getHost(), getRealmPath(realm), service || state.getAuthenticationService()) : util.format(authenticateUrlTemplate, state.getHost(), getRealmPath(realm));
|
|
37
45
|
const {
|
|
38
46
|
data
|
|
39
|
-
} = await generateAmApi(
|
|
47
|
+
} = await generateAmApi({
|
|
48
|
+
resource: getApiConfig(),
|
|
49
|
+
state
|
|
50
|
+
}).post(urlString, body, config);
|
|
40
51
|
return data;
|
|
41
52
|
}
|
|
42
53
|
//# sourceMappingURL=AuthenticateApi.js.map
|