From 81a608448213b3201b22363ccd2548fc4ce8812d Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 8 Oct 2020 12:17:59 -0400 Subject: [PATCH 1/6] feat: support required params validation - OKTA-332240 --- src/generated-client.js | 1182 +++++++++++++++++++++++++++++ templates/generated-client.js.hbs | 5 + templates/helpers/operation.js | 5 + 3 files changed, 1192 insertions(+) diff --git a/src/generated-client.js b/src/generated-client.js index 94b0303d1..b3f7e295a 100644 --- a/src/generated-client.js +++ b/src/generated-client.js @@ -63,6 +63,9 @@ class GeneratedApiClient { * @returns {Promise} */ createApplication(application, queryParameters) { + if (!application) { + return Promise.reject(new Error('OKTA API createApplication parameter application is required.')); + } let url = `${this.baseUrl}/api/v1/apps`; const queryString = qs.stringify(queryParameters || {}); @@ -87,6 +90,9 @@ class GeneratedApiClient { * Removes an inactive application. */ deleteApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API deleteApplication parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}`; const resources = [ @@ -111,6 +117,9 @@ class GeneratedApiClient { * @returns {Promise} */ getApplication(appId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API getApplication parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}`; const queryString = qs.stringify(queryParameters || {}); @@ -137,6 +146,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateApplication(appId, application) { + if (!appId) { + return Promise.reject(new Error('OKTA API updateApplication parameter appId is required.')); + } + if (!application) { + return Promise.reject(new Error('OKTA API updateApplication parameter application is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}`; const resources = [ @@ -161,6 +176,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Csr} instances. */ listCsrsForApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API listCsrsForApplication parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs`; return new Collection( @@ -179,6 +197,12 @@ class GeneratedApiClient { * @returns {Promise} */ generateCsrForApplication(appId, csrMetadata) { + if (!appId) { + return Promise.reject(new Error('OKTA API generateCsrForApplication parameter appId is required.')); + } + if (!metadata) { + return Promise.reject(new Error('OKTA API generateCsrForApplication parameter metadata is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs`; const resources = [ @@ -203,6 +227,12 @@ class GeneratedApiClient { * Convenience method for /api/v1/apps/{appId}/credentials/csrs/{csrId} */ revokeCsrFromApplication(appId, csrId) { + if (!appId) { + return Promise.reject(new Error('OKTA API revokeCsrFromApplication parameter appId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API revokeCsrFromApplication parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs/${csrId}`; const resources = [ @@ -227,6 +257,12 @@ class GeneratedApiClient { * @returns {Promise} */ getCsrForApplication(appId, csrId) { + if (!appId) { + return Promise.reject(new Error('OKTA API getCsrForApplication parameter appId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API getCsrForApplication parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs/${csrId}`; const resources = [ @@ -252,6 +288,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishCerCert(appId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishCerCert parameter certificate is required.')); + } + if (!appId) { + return Promise.reject(new Error('OKTA API publishCerCert parameter appId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishCerCert parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -282,6 +327,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishBinaryCerCert(appId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishBinaryCerCert parameter certificate is required.')); + } + if (!appId) { + return Promise.reject(new Error('OKTA API publishBinaryCerCert parameter appId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishBinaryCerCert parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -312,6 +366,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishDerCert(appId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishDerCert parameter certificate is required.')); + } + if (!appId) { + return Promise.reject(new Error('OKTA API publishDerCert parameter appId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishDerCert parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -342,6 +405,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishBinaryDerCert(appId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishBinaryDerCert parameter certificate is required.')); + } + if (!appId) { + return Promise.reject(new Error('OKTA API publishBinaryDerCert parameter appId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishBinaryDerCert parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -372,6 +444,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishBinaryPemCert(appId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishBinaryPemCert parameter certificate is required.')); + } + if (!appId) { + return Promise.reject(new Error('OKTA API publishBinaryPemCert parameter appId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishBinaryPemCert parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -400,6 +481,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link JsonWebKey} instances. */ listApplicationKeys(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API listApplicationKeys parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/keys`; return new Collection( @@ -419,6 +503,9 @@ class GeneratedApiClient { * @returns {Promise} */ generateApplicationKey(appId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API generateApplicationKey parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/keys/generate`; const queryString = qs.stringify(queryParameters || {}); @@ -445,6 +532,12 @@ class GeneratedApiClient { * @returns {Promise} */ getApplicationKey(appId, keyId) { + if (!appId) { + return Promise.reject(new Error('OKTA API getApplicationKey parameter appId is required.')); + } + if (!keyId) { + return Promise.reject(new Error('OKTA API getApplicationKey parameter keyId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/keys/${keyId}`; const resources = [ @@ -471,6 +564,15 @@ class GeneratedApiClient { * @returns {Promise} */ cloneApplicationKey(appId, keyId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API cloneApplicationKey parameter appId is required.')); + } + if (!keyId) { + return Promise.reject(new Error('OKTA API cloneApplicationKey parameter keyId is required.')); + } + if (!targetAid) { + return Promise.reject(new Error('OKTA API cloneApplicationKey parameter targetAid is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/keys/${keyId}/clone`; const queryString = qs.stringify(queryParameters || {}); @@ -499,6 +601,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2ScopeConsentGrant} instances. */ listScopeConsentGrants(appId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API listScopeConsentGrants parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/grants`; const queryString = qs.stringify(queryParameters || {}); @@ -520,6 +625,12 @@ class GeneratedApiClient { * @returns {Promise} */ grantConsentToScope(appId, oAuth2ScopeConsentGrant) { + if (!appId) { + return Promise.reject(new Error('OKTA API grantConsentToScope parameter appId is required.')); + } + if (!oAuth2ScopeConsentGrant) { + return Promise.reject(new Error('OKTA API grantConsentToScope parameter oAuth2ScopeConsentGrant is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/grants`; const resources = [ @@ -544,6 +655,12 @@ class GeneratedApiClient { * Revokes permission for the application to request the given scope */ revokeScopeConsentGrant(appId, grantId) { + if (!appId) { + return Promise.reject(new Error('OKTA API revokeScopeConsentGrant parameter appId is required.')); + } + if (!grantId) { + return Promise.reject(new Error('OKTA API revokeScopeConsentGrant parameter grantId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/grants/${grantId}`; const resources = [ @@ -570,6 +687,12 @@ class GeneratedApiClient { * @returns {Promise} */ getScopeConsentGrant(appId, grantId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API getScopeConsentGrant parameter appId is required.')); + } + if (!grantId) { + return Promise.reject(new Error('OKTA API getScopeConsentGrant parameter grantId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/grants/${grantId}`; const queryString = qs.stringify(queryParameters || {}); @@ -601,6 +724,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link ApplicationGroupAssignment} instances. */ listApplicationGroupAssignments(appId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API listApplicationGroupAssignments parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/groups`; const queryString = qs.stringify(queryParameters || {}); @@ -621,6 +747,12 @@ class GeneratedApiClient { * Removes a group assignment from an application. */ deleteApplicationGroupAssignment(appId, groupId) { + if (!appId) { + return Promise.reject(new Error('OKTA API deleteApplicationGroupAssignment parameter appId is required.')); + } + if (!groupId) { + return Promise.reject(new Error('OKTA API deleteApplicationGroupAssignment parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/groups/${groupId}`; const resources = [ @@ -647,6 +779,12 @@ class GeneratedApiClient { * @returns {Promise} */ getApplicationGroupAssignment(appId, groupId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API getApplicationGroupAssignment parameter appId is required.')); + } + if (!groupId) { + return Promise.reject(new Error('OKTA API getApplicationGroupAssignment parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/groups/${groupId}`; const queryString = qs.stringify(queryParameters || {}); @@ -675,6 +813,15 @@ class GeneratedApiClient { * @returns {Promise} */ createApplicationGroupAssignment(appId, groupId, applicationGroupAssignment) { + if (!appId) { + return Promise.reject(new Error('OKTA API createApplicationGroupAssignment parameter appId is required.')); + } + if (!groupId) { + return Promise.reject(new Error('OKTA API createApplicationGroupAssignment parameter groupId is required.')); + } + if (!applicationGroupAssignment) { + return Promise.reject(new Error('OKTA API createApplicationGroupAssignment parameter applicationGroupAssignment is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/groups/${groupId}`; const resources = [ @@ -699,6 +846,9 @@ class GeneratedApiClient { * Activates an inactive application. */ activateApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API activateApplication parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/lifecycle/activate`; const resources = [ @@ -724,6 +874,9 @@ class GeneratedApiClient { * Deactivates an active application. */ deactivateApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API deactivateApplication parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/lifecycle/deactivate`; const resources = [ @@ -749,6 +902,9 @@ class GeneratedApiClient { * Revokes all tokens for the specified application */ revokeOAuth2TokensForApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API revokeOAuth2TokensForApplication parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/tokens`; const resources = [ @@ -775,6 +931,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2Token} instances. */ listOAuth2TokensForApplication(appId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API listOAuth2TokensForApplication parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/tokens`; const queryString = qs.stringify(queryParameters || {}); @@ -795,6 +954,12 @@ class GeneratedApiClient { * Revokes the specified token for the specified application */ revokeOAuth2TokenForApplication(appId, tokenId) { + if (!appId) { + return Promise.reject(new Error('OKTA API revokeOAuth2TokenForApplication parameter appId is required.')); + } + if (!tokenId) { + return Promise.reject(new Error('OKTA API revokeOAuth2TokenForApplication parameter tokenId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/tokens/${tokenId}`; const resources = [ @@ -821,6 +986,12 @@ class GeneratedApiClient { * @returns {Promise} */ getOAuth2TokenForApplication(appId, tokenId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API getOAuth2TokenForApplication parameter appId is required.')); + } + if (!tokenId) { + return Promise.reject(new Error('OKTA API getOAuth2TokenForApplication parameter tokenId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/tokens/${tokenId}`; const queryString = qs.stringify(queryParameters || {}); @@ -854,6 +1025,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link AppUser} instances. */ listApplicationUsers(appId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API listApplicationUsers parameter appId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/users`; const queryString = qs.stringify(queryParameters || {}); @@ -875,6 +1049,12 @@ class GeneratedApiClient { * @returns {Promise} */ assignUserToApplication(appId, appUser) { + if (!appId) { + return Promise.reject(new Error('OKTA API assignUserToApplication parameter appId is required.')); + } + if (!appUser) { + return Promise.reject(new Error('OKTA API assignUserToApplication parameter appUser is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/users`; const resources = [ @@ -901,6 +1081,12 @@ class GeneratedApiClient { * Removes an assignment for a user from an application. */ deleteApplicationUser(appId, userId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API deleteApplicationUser parameter appId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API deleteApplicationUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/users/${userId}`; const queryString = qs.stringify(queryParameters || {}); @@ -930,6 +1116,12 @@ class GeneratedApiClient { * @returns {Promise} */ getApplicationUser(appId, userId, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API getApplicationUser parameter appId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API getApplicationUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/users/${userId}`; const queryString = qs.stringify(queryParameters || {}); @@ -958,6 +1150,15 @@ class GeneratedApiClient { * @returns {Promise} */ updateApplicationUser(appId, userId, appUser) { + if (!appId) { + return Promise.reject(new Error('OKTA API updateApplicationUser parameter appId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API updateApplicationUser parameter userId is required.')); + } + if (!appUser) { + return Promise.reject(new Error('OKTA API updateApplicationUser parameter appUser is required.')); + } let url = `${this.baseUrl}/api/v1/apps/${appId}/users/${userId}`; const resources = [ @@ -1006,6 +1207,9 @@ class GeneratedApiClient { * @returns {Promise} */ createAuthorizationServer(authorizationServer) { + if (!authorizationServer) { + return Promise.reject(new Error('OKTA API createAuthorizationServer parameter authorizationServer is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers`; const resources = []; @@ -1027,6 +1231,9 @@ class GeneratedApiClient { * Success */ deleteAuthorizationServer(authServerId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API deleteAuthorizationServer parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}`; const resources = [ @@ -1049,6 +1256,9 @@ class GeneratedApiClient { * @returns {Promise} */ getAuthorizationServer(authServerId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API getAuthorizationServer parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}`; const resources = [ @@ -1072,6 +1282,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateAuthorizationServer(authServerId, authorizationServer) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API updateAuthorizationServer parameter authServerId is required.')); + } + if (!authorizationServer) { + return Promise.reject(new Error('OKTA API updateAuthorizationServer parameter authorizationServer is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}`; const resources = [ @@ -1096,6 +1312,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2Claim} instances. */ listOAuth2Claims(authServerId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API listOAuth2Claims parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/claims`; return new Collection( @@ -1114,6 +1333,12 @@ class GeneratedApiClient { * @returns {Promise} */ createOAuth2Claim(authServerId, oAuth2Claim) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API createOAuth2Claim parameter authServerId is required.')); + } + if (!oAuth2Claim) { + return Promise.reject(new Error('OKTA API createOAuth2Claim parameter oAuth2Claim is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/claims`; const resources = [ @@ -1138,6 +1363,12 @@ class GeneratedApiClient { * Success */ deleteOAuth2Claim(authServerId, claimId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API deleteOAuth2Claim parameter authServerId is required.')); + } + if (!claimId) { + return Promise.reject(new Error('OKTA API deleteOAuth2Claim parameter claimId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/claims/${claimId}`; const resources = [ @@ -1162,6 +1393,12 @@ class GeneratedApiClient { * @returns {Promise} */ getOAuth2Claim(authServerId, claimId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API getOAuth2Claim parameter authServerId is required.')); + } + if (!claimId) { + return Promise.reject(new Error('OKTA API getOAuth2Claim parameter claimId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/claims/${claimId}`; const resources = [ @@ -1187,6 +1424,15 @@ class GeneratedApiClient { * @returns {Promise} */ updateOAuth2Claim(authServerId, claimId, oAuth2Claim) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API updateOAuth2Claim parameter authServerId is required.')); + } + if (!claimId) { + return Promise.reject(new Error('OKTA API updateOAuth2Claim parameter claimId is required.')); + } + if (!oAuth2Claim) { + return Promise.reject(new Error('OKTA API updateOAuth2Claim parameter oAuth2Claim is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/claims/${claimId}`; const resources = [ @@ -1212,6 +1458,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2Client} instances. */ listOAuth2ClientsForAuthorizationServer(authServerId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API listOAuth2ClientsForAuthorizationServer parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/clients`; return new Collection( @@ -1229,6 +1478,12 @@ class GeneratedApiClient { * Success */ revokeRefreshTokensForAuthorizationServerAndClient(authServerId, clientId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API revokeRefreshTokensForAuthorizationServerAndClient parameter authServerId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API revokeRefreshTokensForAuthorizationServerAndClient parameter clientId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/clients/${clientId}/tokens`; const resources = [ @@ -1257,6 +1512,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2RefreshToken} instances. */ listRefreshTokensForAuthorizationServerAndClient(authServerId, clientId, queryParameters) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API listRefreshTokensForAuthorizationServerAndClient parameter authServerId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API listRefreshTokensForAuthorizationServerAndClient parameter clientId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/clients/${clientId}/tokens`; const queryString = qs.stringify(queryParameters || {}); @@ -1278,6 +1539,15 @@ class GeneratedApiClient { * Success */ revokeRefreshTokenForAuthorizationServerAndClient(authServerId, clientId, tokenId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API revokeRefreshTokenForAuthorizationServerAndClient parameter authServerId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API revokeRefreshTokenForAuthorizationServerAndClient parameter clientId is required.')); + } + if (!tokenId) { + return Promise.reject(new Error('OKTA API revokeRefreshTokenForAuthorizationServerAndClient parameter tokenId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/clients/${clientId}/tokens/${tokenId}`; const resources = [ @@ -1306,6 +1576,15 @@ class GeneratedApiClient { * @returns {Promise} */ getRefreshTokenForAuthorizationServerAndClient(authServerId, clientId, tokenId, queryParameters) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API getRefreshTokenForAuthorizationServerAndClient parameter authServerId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API getRefreshTokenForAuthorizationServerAndClient parameter clientId is required.')); + } + if (!tokenId) { + return Promise.reject(new Error('OKTA API getRefreshTokenForAuthorizationServerAndClient parameter tokenId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/clients/${clientId}/tokens/${tokenId}`; const queryString = qs.stringify(queryParameters || {}); @@ -1333,6 +1612,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link JsonWebKey} instances. */ listAuthorizationServerKeys(authServerId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API listAuthorizationServerKeys parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/credentials/keys`; return new Collection( @@ -1350,6 +1632,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link JsonWebKey} instances. */ rotateAuthorizationServerKeys(authServerId, jwkUse) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API rotateAuthorizationServerKeys parameter authServerId is required.')); + } + if (!use) { + return Promise.reject(new Error('OKTA API rotateAuthorizationServerKeys parameter use is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/credentials/lifecycle/keyRotate`; return new Collection( @@ -1367,6 +1655,9 @@ class GeneratedApiClient { * Success */ activateAuthorizationServer(authServerId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API activateAuthorizationServer parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/lifecycle/activate`; const resources = [ @@ -1392,6 +1683,9 @@ class GeneratedApiClient { * Success */ deactivateAuthorizationServer(authServerId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API deactivateAuthorizationServer parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/lifecycle/deactivate`; const resources = [ @@ -1418,6 +1712,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Policy} instances. */ listAuthorizationServerPolicies(authServerId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API listAuthorizationServerPolicies parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies`; return new Collection( @@ -1436,6 +1733,12 @@ class GeneratedApiClient { * @returns {Promise} */ createAuthorizationServerPolicy(authServerId, policy) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API createAuthorizationServerPolicy parameter authServerId is required.')); + } + if (!policy) { + return Promise.reject(new Error('OKTA API createAuthorizationServerPolicy parameter policy is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies`; const resources = [ @@ -1460,6 +1763,12 @@ class GeneratedApiClient { * Success */ deleteAuthorizationServerPolicy(authServerId, policyId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API deleteAuthorizationServerPolicy parameter authServerId is required.')); + } + if (!policyId) { + return Promise.reject(new Error('OKTA API deleteAuthorizationServerPolicy parameter policyId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies/${policyId}`; const resources = [ @@ -1484,6 +1793,12 @@ class GeneratedApiClient { * @returns {Promise} */ getAuthorizationServerPolicy(authServerId, policyId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API getAuthorizationServerPolicy parameter authServerId is required.')); + } + if (!policyId) { + return Promise.reject(new Error('OKTA API getAuthorizationServerPolicy parameter policyId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies/${policyId}`; const resources = [ @@ -1509,6 +1824,15 @@ class GeneratedApiClient { * @returns {Promise} */ updateAuthorizationServerPolicy(authServerId, policyId, policy) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API updateAuthorizationServerPolicy parameter authServerId is required.')); + } + if (!policyId) { + return Promise.reject(new Error('OKTA API updateAuthorizationServerPolicy parameter policyId is required.')); + } + if (!policy) { + return Promise.reject(new Error('OKTA API updateAuthorizationServerPolicy parameter policy is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies/${policyId}`; const resources = [ @@ -1539,6 +1863,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2Scope} instances. */ listOAuth2Scopes(authServerId, queryParameters) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API listOAuth2Scopes parameter authServerId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/scopes`; const queryString = qs.stringify(queryParameters || {}); @@ -1560,6 +1887,12 @@ class GeneratedApiClient { * @returns {Promise} */ createOAuth2Scope(authServerId, oAuth2Scope) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API createOAuth2Scope parameter authServerId is required.')); + } + if (!oAuth2Scope) { + return Promise.reject(new Error('OKTA API createOAuth2Scope parameter oAuth2Scope is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/scopes`; const resources = [ @@ -1584,6 +1917,12 @@ class GeneratedApiClient { * Success */ deleteOAuth2Scope(authServerId, scopeId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API deleteOAuth2Scope parameter authServerId is required.')); + } + if (!scopeId) { + return Promise.reject(new Error('OKTA API deleteOAuth2Scope parameter scopeId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/scopes/${scopeId}`; const resources = [ @@ -1608,6 +1947,12 @@ class GeneratedApiClient { * @returns {Promise} */ getOAuth2Scope(authServerId, scopeId) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API getOAuth2Scope parameter authServerId is required.')); + } + if (!scopeId) { + return Promise.reject(new Error('OKTA API getOAuth2Scope parameter scopeId is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/scopes/${scopeId}`; const resources = [ @@ -1633,6 +1978,15 @@ class GeneratedApiClient { * @returns {Promise} */ updateOAuth2Scope(authServerId, scopeId, oAuth2Scope) { + if (!authServerId) { + return Promise.reject(new Error('OKTA API updateOAuth2Scope parameter authServerId is required.')); + } + if (!scopeId) { + return Promise.reject(new Error('OKTA API updateOAuth2Scope parameter scopeId is required.')); + } + if (!oAuth2Scope) { + return Promise.reject(new Error('OKTA API updateOAuth2Scope parameter oAuth2Scope is required.')); + } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/scopes/${scopeId}`; const resources = [ @@ -1674,6 +2028,9 @@ class GeneratedApiClient { * @returns {Promise} */ createEventHook(eventHook) { + if (!eventHook) { + return Promise.reject(new Error('OKTA API createEventHook parameter eventHook is required.')); + } let url = `${this.baseUrl}/api/v1/eventHooks`; const resources = []; @@ -1695,6 +2052,9 @@ class GeneratedApiClient { * Success */ deleteEventHook(eventHookId) { + if (!eventHookId) { + return Promise.reject(new Error('OKTA API deleteEventHook parameter eventHookId is required.')); + } let url = `${this.baseUrl}/api/v1/eventHooks/${eventHookId}`; const resources = [ @@ -1717,6 +2077,9 @@ class GeneratedApiClient { * @returns {Promise} */ getEventHook(eventHookId) { + if (!eventHookId) { + return Promise.reject(new Error('OKTA API getEventHook parameter eventHookId is required.')); + } let url = `${this.baseUrl}/api/v1/eventHooks/${eventHookId}`; const resources = [ @@ -1740,6 +2103,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateEventHook(eventHookId, eventHook) { + if (!eventHookId) { + return Promise.reject(new Error('OKTA API updateEventHook parameter eventHookId is required.')); + } + if (!eventHook) { + return Promise.reject(new Error('OKTA API updateEventHook parameter eventHook is required.')); + } let url = `${this.baseUrl}/api/v1/eventHooks/${eventHookId}`; const resources = [ @@ -1764,6 +2133,9 @@ class GeneratedApiClient { * @returns {Promise} */ activateEventHook(eventHookId) { + if (!eventHookId) { + return Promise.reject(new Error('OKTA API activateEventHook parameter eventHookId is required.')); + } let url = `${this.baseUrl}/api/v1/eventHooks/${eventHookId}/lifecycle/activate`; const resources = [ @@ -1786,6 +2158,9 @@ class GeneratedApiClient { * @returns {Promise} */ deactivateEventHook(eventHookId) { + if (!eventHookId) { + return Promise.reject(new Error('OKTA API deactivateEventHook parameter eventHookId is required.')); + } let url = `${this.baseUrl}/api/v1/eventHooks/${eventHookId}/lifecycle/deactivate`; const resources = [ @@ -1808,6 +2183,9 @@ class GeneratedApiClient { * @returns {Promise} */ verifyEventHook(eventHookId) { + if (!eventHookId) { + return Promise.reject(new Error('OKTA API verifyEventHook parameter eventHookId is required.')); + } let url = `${this.baseUrl}/api/v1/eventHooks/${eventHookId}/lifecycle/verify`; const resources = [ @@ -1846,6 +2224,9 @@ class GeneratedApiClient { * @returns {Promise} */ getFeature(featureId) { + if (!featureId) { + return Promise.reject(new Error('OKTA API getFeature parameter featureId is required.')); + } let url = `${this.baseUrl}/api/v1/features/${featureId}`; const resources = [ @@ -1868,6 +2249,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Feature} instances. */ listFeatureDependencies(featureId) { + if (!featureId) { + return Promise.reject(new Error('OKTA API listFeatureDependencies parameter featureId is required.')); + } let url = `${this.baseUrl}/api/v1/features/${featureId}/dependencies`; return new Collection( @@ -1885,6 +2269,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Feature} instances. */ listFeatureDependents(featureId) { + if (!featureId) { + return Promise.reject(new Error('OKTA API listFeatureDependents parameter featureId is required.')); + } let url = `${this.baseUrl}/api/v1/features/${featureId}/dependents`; return new Collection( @@ -1905,6 +2292,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateFeatureLifecycle(featureId, lifecycle, queryParameters) { + if (!featureId) { + return Promise.reject(new Error('OKTA API updateFeatureLifecycle parameter featureId is required.')); + } + if (!lifecycle) { + return Promise.reject(new Error('OKTA API updateFeatureLifecycle parameter lifecycle is required.')); + } let url = `${this.baseUrl}/api/v1/features/${featureId}/${lifecycle}`; const queryString = qs.stringify(queryParameters || {}); @@ -1955,6 +2348,9 @@ class GeneratedApiClient { * @returns {Promise} */ createGroup(group) { + if (!group) { + return Promise.reject(new Error('OKTA API createGroup parameter group is required.')); + } let url = `${this.baseUrl}/api/v1/groups`; const resources = []; @@ -2001,6 +2397,9 @@ class GeneratedApiClient { * @returns {Promise} */ createGroupRule(groupRule) { + if (!groupRule) { + return Promise.reject(new Error('OKTA API createGroupRule parameter groupRule is required.')); + } let url = `${this.baseUrl}/api/v1/groups/rules`; const resources = []; @@ -2022,6 +2421,9 @@ class GeneratedApiClient { * Removes a specific group rule by id from your organization */ deleteGroupRule(ruleId) { + if (!ruleId) { + return Promise.reject(new Error('OKTA API deleteGroupRule parameter ruleId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/rules/${ruleId}`; const resources = [ @@ -2046,6 +2448,9 @@ class GeneratedApiClient { * @returns {Promise} */ getGroupRule(ruleId, queryParameters) { + if (!ruleId) { + return Promise.reject(new Error('OKTA API getGroupRule parameter ruleId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/rules/${ruleId}`; const queryString = qs.stringify(queryParameters || {}); @@ -2072,6 +2477,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateGroupRule(ruleId, groupRule) { + if (!ruleId) { + return Promise.reject(new Error('OKTA API updateGroupRule parameter ruleId is required.')); + } + if (!groupRule) { + return Promise.reject(new Error('OKTA API updateGroupRule parameter groupRule is required.')); + } let url = `${this.baseUrl}/api/v1/groups/rules/${ruleId}`; const resources = [ @@ -2095,6 +2506,9 @@ class GeneratedApiClient { * Activates a specific group rule by id from your organization */ activateGroupRule(ruleId) { + if (!ruleId) { + return Promise.reject(new Error('OKTA API activateGroupRule parameter ruleId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/rules/${ruleId}/lifecycle/activate`; const resources = [ @@ -2120,6 +2534,9 @@ class GeneratedApiClient { * Deactivates a specific group rule by id from your organization */ deactivateGroupRule(ruleId) { + if (!ruleId) { + return Promise.reject(new Error('OKTA API deactivateGroupRule parameter ruleId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/rules/${ruleId}/lifecycle/deactivate`; const resources = [ @@ -2145,6 +2562,9 @@ class GeneratedApiClient { * Removes a group with `OKTA_GROUP` type from your organization. */ deleteGroup(groupId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API deleteGroup parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}`; const resources = [ @@ -2167,6 +2587,9 @@ class GeneratedApiClient { * @returns {Promise} */ getGroup(groupId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API getGroup parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}`; const resources = [ @@ -2190,6 +2613,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateGroup(groupId, group) { + if (!groupId) { + return Promise.reject(new Error('OKTA API updateGroup parameter groupId is required.')); + } + if (!group) { + return Promise.reject(new Error('OKTA API updateGroup parameter group is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}`; const resources = [ @@ -2217,6 +2646,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Application} instances. */ listAssignedApplicationsForGroup(groupId, queryParameters) { + if (!groupId) { + return Promise.reject(new Error('OKTA API listAssignedApplicationsForGroup parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/apps`; const queryString = qs.stringify(queryParameters || {}); @@ -2239,6 +2671,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Role} instances. */ listGroupAssignedRoles(groupId, queryParameters) { + if (!groupId) { + return Promise.reject(new Error('OKTA API listGroupAssignedRoles parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles`; const queryString = qs.stringify(queryParameters || {}); @@ -2262,6 +2697,12 @@ class GeneratedApiClient { * @returns {Promise} */ assignRoleToGroup(groupId, assignRoleRequest, queryParameters) { + if (!assignRoleRequest) { + return Promise.reject(new Error('OKTA API assignRoleToGroup parameter assignRoleRequest is required.')); + } + if (!groupId) { + return Promise.reject(new Error('OKTA API assignRoleToGroup parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles`; const queryString = qs.stringify(queryParameters || {}); @@ -2289,6 +2730,12 @@ class GeneratedApiClient { * Unassigns a Role from a Group */ removeRoleFromGroup(groupId, roleId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API removeRoleFromGroup parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API removeRoleFromGroup parameter roleId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}`; const resources = [ @@ -2313,6 +2760,12 @@ class GeneratedApiClient { * @returns {Promise} */ getRole(groupId, roleId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API getRole parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API getRole parameter roleId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}`; const resources = [ @@ -2340,6 +2793,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link CatalogApplication} instances. */ listApplicationTargetsForApplicationAdministratorRoleForGroup(groupId, roleId, queryParameters) { + if (!groupId) { + return Promise.reject(new Error('OKTA API listApplicationTargetsForApplicationAdministratorRoleForGroup parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API listApplicationTargetsForApplicationAdministratorRoleForGroup parameter roleId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}/targets/catalog/apps`; const queryString = qs.stringify(queryParameters || {}); @@ -2361,6 +2820,15 @@ class GeneratedApiClient { * Success */ removeApplicationTargetFromApplicationAdministratorRoleGivenToGroup(groupId, roleId, appName) { + if (!groupId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromApplicationAdministratorRoleGivenToGroup parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromApplicationAdministratorRoleGivenToGroup parameter roleId is required.')); + } + if (!appName) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromApplicationAdministratorRoleGivenToGroup parameter appName is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}/targets/catalog/apps/${appName}`; const resources = [ @@ -2386,6 +2854,15 @@ class GeneratedApiClient { * Success */ addApplicationTargetToAdminRoleGivenToGroup(groupId, roleId, appName) { + if (!groupId) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAdminRoleGivenToGroup parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAdminRoleGivenToGroup parameter roleId is required.')); + } + if (!appName) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAdminRoleGivenToGroup parameter appName is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}/targets/catalog/apps/${appName}`; const resources = [ @@ -2416,6 +2893,18 @@ class GeneratedApiClient { * Remove App Instance Target to App Administrator Role given to a Group */ removeApplicationTargetFromAdministratorRoleGivenToGroup(groupId, roleId, appName, applicationId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromAdministratorRoleGivenToGroup parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromAdministratorRoleGivenToGroup parameter roleId is required.')); + } + if (!appName) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromAdministratorRoleGivenToGroup parameter appName is required.')); + } + if (!applicationId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromAdministratorRoleGivenToGroup parameter applicationId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}/targets/catalog/apps/${appName}/${applicationId}`; const resources = [ @@ -2443,6 +2932,18 @@ class GeneratedApiClient { * Add App Instance Target to App Administrator Role given to a Group */ addApplicationInstanceTargetToAppAdminRoleGivenToGroup(groupId, roleId, appName, applicationId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API addApplicationInstanceTargetToAppAdminRoleGivenToGroup parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API addApplicationInstanceTargetToAppAdminRoleGivenToGroup parameter roleId is required.')); + } + if (!appName) { + return Promise.reject(new Error('OKTA API addApplicationInstanceTargetToAppAdminRoleGivenToGroup parameter appName is required.')); + } + if (!applicationId) { + return Promise.reject(new Error('OKTA API addApplicationInstanceTargetToAppAdminRoleGivenToGroup parameter applicationId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}/targets/catalog/apps/${appName}/${applicationId}`; const resources = [ @@ -2476,6 +2977,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Group} instances. */ listGroupTargetsForGroupRole(groupId, roleId, queryParameters) { + if (!groupId) { + return Promise.reject(new Error('OKTA API listGroupTargetsForGroupRole parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API listGroupTargetsForGroupRole parameter roleId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}/targets/groups`; const queryString = qs.stringify(queryParameters || {}); @@ -2497,6 +3004,15 @@ class GeneratedApiClient { * Convenience method for /api/v1/groups/{groupId}/roles/{roleId}/targets/groups/{targetGroupId} */ removeGroupTargetFromGroupAdministratorRoleGivenToGroup(groupId, roleId, targetGroupId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API removeGroupTargetFromGroupAdministratorRoleGivenToGroup parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API removeGroupTargetFromGroupAdministratorRoleGivenToGroup parameter roleId is required.')); + } + if (!targetGroupId) { + return Promise.reject(new Error('OKTA API removeGroupTargetFromGroupAdministratorRoleGivenToGroup parameter targetGroupId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}/targets/groups/${targetGroupId}`; const resources = [ @@ -2522,6 +3038,15 @@ class GeneratedApiClient { * Convenience method for /api/v1/groups/{groupId}/roles/{roleId}/targets/groups/{targetGroupId} */ addGroupTargetToGroupAdministratorRoleForGroup(groupId, roleId, targetGroupId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API addGroupTargetToGroupAdministratorRoleForGroup parameter groupId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API addGroupTargetToGroupAdministratorRoleForGroup parameter roleId is required.')); + } + if (!targetGroupId) { + return Promise.reject(new Error('OKTA API addGroupTargetToGroupAdministratorRoleForGroup parameter targetGroupId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/roles/${roleId}/targets/groups/${targetGroupId}`; const resources = [ @@ -2553,6 +3078,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link User} instances. */ listGroupUsers(groupId, queryParameters) { + if (!groupId) { + return Promise.reject(new Error('OKTA API listGroupUsers parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/users`; const queryString = qs.stringify(queryParameters || {}); @@ -2573,6 +3101,12 @@ class GeneratedApiClient { * Removes a user from a group with 'OKTA_GROUP' type. */ removeUserFromGroup(groupId, userId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API removeUserFromGroup parameter groupId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API removeUserFromGroup parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/users/${userId}`; const resources = [ @@ -2596,6 +3130,12 @@ class GeneratedApiClient { * Adds a user to a group with 'OKTA_GROUP' type. */ addUserToGroup(groupId, userId) { + if (!groupId) { + return Promise.reject(new Error('OKTA API addUserToGroup parameter groupId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API addUserToGroup parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/groups/${groupId}/users/${userId}`; const resources = [ @@ -2647,6 +3187,9 @@ class GeneratedApiClient { * @returns {Promise} */ createIdentityProvider(identityProvider) { + if (!identityProvider) { + return Promise.reject(new Error('OKTA API createIdentityProvider parameter identityProvider is required.')); + } let url = `${this.baseUrl}/api/v1/idps`; const resources = []; @@ -2691,6 +3234,9 @@ class GeneratedApiClient { * @returns {Promise} */ createIdentityProviderKey(jsonWebKey) { + if (!jsonWebKey) { + return Promise.reject(new Error('OKTA API createIdentityProviderKey parameter jsonWebKey is required.')); + } let url = `${this.baseUrl}/api/v1/idps/credentials/keys`; const resources = []; @@ -2712,6 +3258,9 @@ class GeneratedApiClient { * Deletes a specific IdP Key Credential by `kid` if it is not currently being used by an Active or Inactive IdP. */ deleteIdentityProviderKey(keyId) { + if (!keyId) { + return Promise.reject(new Error('OKTA API deleteIdentityProviderKey parameter keyId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/credentials/keys/${keyId}`; const resources = [ @@ -2734,6 +3283,9 @@ class GeneratedApiClient { * @returns {Promise} */ getIdentityProviderKey(keyId) { + if (!keyId) { + return Promise.reject(new Error('OKTA API getIdentityProviderKey parameter keyId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/credentials/keys/${keyId}`; const resources = [ @@ -2755,6 +3307,9 @@ class GeneratedApiClient { * Removes an IdP from your organization. */ deleteIdentityProvider(idpId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API deleteIdentityProvider parameter idpId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}`; const resources = [ @@ -2777,6 +3332,9 @@ class GeneratedApiClient { * @returns {Promise} */ getIdentityProvider(idpId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API getIdentityProvider parameter idpId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}`; const resources = [ @@ -2800,6 +3358,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateIdentityProvider(idpId, identityProvider) { + if (!idpId) { + return Promise.reject(new Error('OKTA API updateIdentityProvider parameter idpId is required.')); + } + if (!identityProvider) { + return Promise.reject(new Error('OKTA API updateIdentityProvider parameter identityProvider is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}`; const resources = [ @@ -2824,6 +3388,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Csr} instances. */ listCsrsForIdentityProvider(idpId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API listCsrsForIdentityProvider parameter idpId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs`; return new Collection( @@ -2842,6 +3409,12 @@ class GeneratedApiClient { * @returns {Promise} */ generateCsrForIdentityProvider(idpId, csrMetadata) { + if (!idpId) { + return Promise.reject(new Error('OKTA API generateCsrForIdentityProvider parameter idpId is required.')); + } + if (!metadata) { + return Promise.reject(new Error('OKTA API generateCsrForIdentityProvider parameter metadata is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs`; const resources = [ @@ -2866,6 +3439,12 @@ class GeneratedApiClient { * Revoke a Certificate Signing Request and delete the key pair from the IdP */ revokeCsrForIdentityProvider(idpId, csrId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API revokeCsrForIdentityProvider parameter idpId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API revokeCsrForIdentityProvider parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs/${csrId}`; const resources = [ @@ -2890,6 +3469,12 @@ class GeneratedApiClient { * @returns {Promise} */ getCsrForIdentityProvider(idpId, csrId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API getCsrForIdentityProvider parameter idpId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API getCsrForIdentityProvider parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs/${csrId}`; const resources = [ @@ -2915,6 +3500,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishCerCertForIdentityProvider(idpId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishCerCertForIdentityProvider parameter certificate is required.')); + } + if (!idpId) { + return Promise.reject(new Error('OKTA API publishCerCertForIdentityProvider parameter idpId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishCerCertForIdentityProvider parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -2945,6 +3539,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishBinaryCerCertForIdentityProvider(idpId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishBinaryCerCertForIdentityProvider parameter certificate is required.')); + } + if (!idpId) { + return Promise.reject(new Error('OKTA API publishBinaryCerCertForIdentityProvider parameter idpId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishBinaryCerCertForIdentityProvider parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -2975,6 +3578,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishDerCertForIdentityProvider(idpId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishDerCertForIdentityProvider parameter certificate is required.')); + } + if (!idpId) { + return Promise.reject(new Error('OKTA API publishDerCertForIdentityProvider parameter idpId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishDerCertForIdentityProvider parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -3005,6 +3617,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishBinaryDerCertForIdentityProvider(idpId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishBinaryDerCertForIdentityProvider parameter certificate is required.')); + } + if (!idpId) { + return Promise.reject(new Error('OKTA API publishBinaryDerCertForIdentityProvider parameter idpId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishBinaryDerCertForIdentityProvider parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -3035,6 +3656,15 @@ class GeneratedApiClient { * @returns {Promise} */ publishBinaryPemCertForIdentityProvider(idpId, csrId, certificate) { + if (!certificate) { + return Promise.reject(new Error('OKTA API publishBinaryPemCertForIdentityProvider parameter certificate is required.')); + } + if (!idpId) { + return Promise.reject(new Error('OKTA API publishBinaryPemCertForIdentityProvider parameter idpId is required.')); + } + if (!csrId) { + return Promise.reject(new Error('OKTA API publishBinaryPemCertForIdentityProvider parameter csrId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs/${csrId}/lifecycle/publish`; const resources = [ @@ -3063,6 +3693,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link JsonWebKey} instances. */ listIdentityProviderSigningKeys(idpId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API listIdentityProviderSigningKeys parameter idpId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/keys`; return new Collection( @@ -3082,6 +3715,12 @@ class GeneratedApiClient { * @returns {Promise} */ generateIdentityProviderSigningKey(idpId, queryParameters) { + if (!idpId) { + return Promise.reject(new Error('OKTA API generateIdentityProviderSigningKey parameter idpId is required.')); + } + if (!validityYears) { + return Promise.reject(new Error('OKTA API generateIdentityProviderSigningKey parameter validityYears is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/keys/generate`; const queryString = qs.stringify(queryParameters || {}); @@ -3108,6 +3747,12 @@ class GeneratedApiClient { * @returns {Promise} */ getIdentityProviderSigningKey(idpId, keyId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API getIdentityProviderSigningKey parameter idpId is required.')); + } + if (!keyId) { + return Promise.reject(new Error('OKTA API getIdentityProviderSigningKey parameter keyId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/keys/${keyId}`; const resources = [ @@ -3134,6 +3779,15 @@ class GeneratedApiClient { * @returns {Promise} */ cloneIdentityProviderKey(idpId, keyId, queryParameters) { + if (!idpId) { + return Promise.reject(new Error('OKTA API cloneIdentityProviderKey parameter idpId is required.')); + } + if (!keyId) { + return Promise.reject(new Error('OKTA API cloneIdentityProviderKey parameter keyId is required.')); + } + if (!targetIdpId) { + return Promise.reject(new Error('OKTA API cloneIdentityProviderKey parameter targetIdpId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/keys/${keyId}/clone`; const queryString = qs.stringify(queryParameters || {}); @@ -3160,6 +3814,9 @@ class GeneratedApiClient { * @returns {Promise} */ activateIdentityProvider(idpId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API activateIdentityProvider parameter idpId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/lifecycle/activate`; const resources = [ @@ -3182,6 +3839,9 @@ class GeneratedApiClient { * @returns {Promise} */ deactivateIdentityProvider(idpId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API deactivateIdentityProvider parameter idpId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/lifecycle/deactivate`; const resources = [ @@ -3204,6 +3864,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link IdentityProviderApplicationUser} instances. */ listIdentityProviderApplicationUsers(idpId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API listIdentityProviderApplicationUsers parameter idpId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/users`; return new Collection( @@ -3221,6 +3884,12 @@ class GeneratedApiClient { * Removes the link between the Okta user and the IdP user. */ unlinkUserFromIdentityProvider(idpId, userId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API unlinkUserFromIdentityProvider parameter idpId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API unlinkUserFromIdentityProvider parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/users/${userId}`; const resources = [ @@ -3245,6 +3914,12 @@ class GeneratedApiClient { * @returns {Promise} */ getIdentityProviderApplicationUser(idpId, userId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API getIdentityProviderApplicationUser parameter idpId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API getIdentityProviderApplicationUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/users/${userId}`; const resources = [ @@ -3270,6 +3945,15 @@ class GeneratedApiClient { * @returns {Promise} */ linkUserToIdentityProvider(idpId, userId, userIdentityProviderLinkRequest) { + if (!idpId) { + return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter idpId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter userId is required.')); + } + if (!userIdentityProviderLinkRequest) { + return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter userIdentityProviderLinkRequest is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/users/${userId}`; const resources = [ @@ -3296,6 +3980,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link SocialAuthToken} instances. */ listSocialAuthTokens(idpId, userId) { + if (!idpId) { + return Promise.reject(new Error('OKTA API listSocialAuthTokens parameter idpId is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API listSocialAuthTokens parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/idps/${idpId}/users/${userId}/credentials/tokens`; return new Collection( @@ -3334,6 +4024,9 @@ class GeneratedApiClient { * @returns {Promise} */ createInlineHook(inlineHook) { + if (!inlineHook) { + return Promise.reject(new Error('OKTA API createInlineHook parameter inlineHook is required.')); + } let url = `${this.baseUrl}/api/v1/inlineHooks`; const resources = []; @@ -3355,6 +4048,9 @@ class GeneratedApiClient { * Deletes the Inline Hook matching the provided id. Once deleted, the Inline Hook is unrecoverable. As a safety precaution, only Inline Hooks with a status of INACTIVE are eligible for deletion. */ deleteInlineHook(inlineHookId) { + if (!inlineHookId) { + return Promise.reject(new Error('OKTA API deleteInlineHook parameter inlineHookId is required.')); + } let url = `${this.baseUrl}/api/v1/inlineHooks/${inlineHookId}`; const resources = [ @@ -3377,6 +4073,9 @@ class GeneratedApiClient { * @returns {Promise} */ getInlineHook(inlineHookId) { + if (!inlineHookId) { + return Promise.reject(new Error('OKTA API getInlineHook parameter inlineHookId is required.')); + } let url = `${this.baseUrl}/api/v1/inlineHooks/${inlineHookId}`; const resources = [ @@ -3400,6 +4099,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateInlineHook(inlineHookId, inlineHook) { + if (!inlineHookId) { + return Promise.reject(new Error('OKTA API updateInlineHook parameter inlineHookId is required.')); + } + if (!inlineHook) { + return Promise.reject(new Error('OKTA API updateInlineHook parameter inlineHook is required.')); + } let url = `${this.baseUrl}/api/v1/inlineHooks/${inlineHookId}`; const resources = [ @@ -3425,6 +4130,12 @@ class GeneratedApiClient { * @returns {Promise} */ executeInlineHook(inlineHookId, inlineHookPayload) { + if (!inlineHookId) { + return Promise.reject(new Error('OKTA API executeInlineHook parameter inlineHookId is required.')); + } + if (!payloadData) { + return Promise.reject(new Error('OKTA API executeInlineHook parameter payloadData is required.')); + } let url = `${this.baseUrl}/api/v1/inlineHooks/${inlineHookId}/execute`; const resources = [ @@ -3449,6 +4160,9 @@ class GeneratedApiClient { * @returns {Promise} */ activateInlineHook(inlineHookId) { + if (!inlineHookId) { + return Promise.reject(new Error('OKTA API activateInlineHook parameter inlineHookId is required.')); + } let url = `${this.baseUrl}/api/v1/inlineHooks/${inlineHookId}/lifecycle/activate`; const resources = [ @@ -3471,6 +4185,9 @@ class GeneratedApiClient { * @returns {Promise} */ deactivateInlineHook(inlineHookId) { + if (!inlineHookId) { + return Promise.reject(new Error('OKTA API deactivateInlineHook parameter inlineHookId is required.')); + } let url = `${this.baseUrl}/api/v1/inlineHooks/${inlineHookId}/lifecycle/deactivate`; const resources = [ @@ -3536,6 +4253,9 @@ class GeneratedApiClient { * @returns {Promise} */ addLinkedObjectDefinition(linkedObject) { + if (!linkedObject) { + return Promise.reject(new Error('OKTA API addLinkedObjectDefinition parameter linkedObject is required.')); + } let url = `${this.baseUrl}/api/v1/meta/schemas/user/linkedObjects`; const resources = []; @@ -3557,6 +4277,9 @@ class GeneratedApiClient { * Success */ deleteLinkedObjectDefinition(linkedObjectName) { + if (!linkedObjectName) { + return Promise.reject(new Error('OKTA API deleteLinkedObjectDefinition parameter linkedObjectName is required.')); + } let url = `${this.baseUrl}/api/v1/meta/schemas/user/linkedObjects/${linkedObjectName}`; const resources = [ @@ -3579,6 +4302,9 @@ class GeneratedApiClient { * @returns {Promise} */ getLinkedObjectDefinition(linkedObjectName) { + if (!linkedObjectName) { + return Promise.reject(new Error('OKTA API getLinkedObjectDefinition parameter linkedObjectName is required.')); + } let url = `${this.baseUrl}/api/v1/meta/schemas/user/linkedObjects/${linkedObjectName}`; const resources = [ @@ -3617,6 +4343,9 @@ class GeneratedApiClient { * @returns {Promise} */ createUserType(userType) { + if (!userType) { + return Promise.reject(new Error('OKTA API createUserType parameter userType is required.')); + } let url = `${this.baseUrl}/api/v1/meta/types/user`; const resources = []; @@ -3638,6 +4367,9 @@ class GeneratedApiClient { * Deletes a User Type permanently. This operation is not permitted for the default type, nor for any User Type that has existing users */ deleteUserType(typeId) { + if (!typeId) { + return Promise.reject(new Error('OKTA API deleteUserType parameter typeId is required.')); + } let url = `${this.baseUrl}/api/v1/meta/types/user/${typeId}`; const resources = [ @@ -3660,6 +4392,9 @@ class GeneratedApiClient { * @returns {Promise} */ getUserType(typeId) { + if (!typeId) { + return Promise.reject(new Error('OKTA API getUserType parameter typeId is required.')); + } let url = `${this.baseUrl}/api/v1/meta/types/user/${typeId}`; const resources = [ @@ -3683,6 +4418,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateUserType(typeId, userType) { + if (!typeId) { + return Promise.reject(new Error('OKTA API updateUserType parameter typeId is required.')); + } + if (!userType) { + return Promise.reject(new Error('OKTA API updateUserType parameter userType is required.')); + } let url = `${this.baseUrl}/api/v1/meta/types/user/${typeId}`; const resources = [ @@ -3708,6 +4449,12 @@ class GeneratedApiClient { * @returns {Promise} */ replaceUserType(typeId, userType) { + if (!typeId) { + return Promise.reject(new Error('OKTA API replaceUserType parameter typeId is required.')); + } + if (!userType) { + return Promise.reject(new Error('OKTA API replaceUserType parameter userType is required.')); + } let url = `${this.baseUrl}/api/v1/meta/types/user/${typeId}`; const resources = [ @@ -3735,6 +4482,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Policy} instances. */ listPolicies(queryParameters) { + if (!type) { + return Promise.reject(new Error('OKTA API listPolicies parameter type is required.')); + } let url = `${this.baseUrl}/api/v1/policies`; const queryString = qs.stringify(queryParameters || {}); @@ -3757,6 +4507,9 @@ class GeneratedApiClient { * @returns {Promise} */ createPolicy(policy, queryParameters) { + if (!policy) { + return Promise.reject(new Error('OKTA API createPolicy parameter policy is required.')); + } let url = `${this.baseUrl}/api/v1/policies`; const queryString = qs.stringify(queryParameters || {}); @@ -3781,6 +4534,9 @@ class GeneratedApiClient { * Removes a policy. */ deletePolicy(policyId) { + if (!policyId) { + return Promise.reject(new Error('OKTA API deletePolicy parameter policyId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}`; const resources = [ @@ -3805,6 +4561,9 @@ class GeneratedApiClient { * @returns {Promise} */ getPolicy(policyId, queryParameters) { + if (!policyId) { + return Promise.reject(new Error('OKTA API getPolicy parameter policyId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}`; const queryString = qs.stringify(queryParameters || {}); @@ -3831,6 +4590,12 @@ class GeneratedApiClient { * @returns {Promise} */ updatePolicy(policyId, policy) { + if (!policy) { + return Promise.reject(new Error('OKTA API updatePolicy parameter policy is required.')); + } + if (!policyId) { + return Promise.reject(new Error('OKTA API updatePolicy parameter policyId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}`; const resources = [ @@ -3854,6 +4619,9 @@ class GeneratedApiClient { * Activates a policy. */ activatePolicy(policyId) { + if (!policyId) { + return Promise.reject(new Error('OKTA API activatePolicy parameter policyId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/lifecycle/activate`; const resources = [ @@ -3879,6 +4647,9 @@ class GeneratedApiClient { * Deactivates a policy. */ deactivatePolicy(policyId) { + if (!policyId) { + return Promise.reject(new Error('OKTA API deactivatePolicy parameter policyId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/lifecycle/deactivate`; const resources = [ @@ -3905,6 +4676,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link PolicyRule} instances. */ listPolicyRules(policyId) { + if (!policyId) { + return Promise.reject(new Error('OKTA API listPolicyRules parameter policyId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/rules`; return new Collection( @@ -3923,6 +4697,12 @@ class GeneratedApiClient { * @returns {Promise} */ createPolicyRule(policyId, policyRule) { + if (!policyId) { + return Promise.reject(new Error('OKTA API createPolicyRule parameter policyId is required.')); + } + if (!policyRule) { + return Promise.reject(new Error('OKTA API createPolicyRule parameter policyRule is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/rules`; const resources = [ @@ -3947,6 +4727,12 @@ class GeneratedApiClient { * Removes a policy rule. */ deletePolicyRule(policyId, ruleId) { + if (!policyId) { + return Promise.reject(new Error('OKTA API deletePolicyRule parameter policyId is required.')); + } + if (!ruleId) { + return Promise.reject(new Error('OKTA API deletePolicyRule parameter ruleId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/rules/${ruleId}`; const resources = [ @@ -3971,6 +4757,12 @@ class GeneratedApiClient { * @returns {Promise} */ getPolicyRule(policyId, ruleId) { + if (!policyId) { + return Promise.reject(new Error('OKTA API getPolicyRule parameter policyId is required.')); + } + if (!ruleId) { + return Promise.reject(new Error('OKTA API getPolicyRule parameter ruleId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/rules/${ruleId}`; const resources = [ @@ -3996,6 +4788,15 @@ class GeneratedApiClient { * @returns {Promise} */ updatePolicyRule(policyId, ruleId, policyRule) { + if (!policyId) { + return Promise.reject(new Error('OKTA API updatePolicyRule parameter policyId is required.')); + } + if (!ruleId) { + return Promise.reject(new Error('OKTA API updatePolicyRule parameter ruleId is required.')); + } + if (!policyRule) { + return Promise.reject(new Error('OKTA API updatePolicyRule parameter policyRule is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/rules/${ruleId}`; const resources = [ @@ -4021,6 +4822,12 @@ class GeneratedApiClient { * Activates a policy rule. */ activatePolicyRule(policyId, ruleId) { + if (!policyId) { + return Promise.reject(new Error('OKTA API activatePolicyRule parameter policyId is required.')); + } + if (!ruleId) { + return Promise.reject(new Error('OKTA API activatePolicyRule parameter ruleId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/rules/${ruleId}/lifecycle/activate`; const resources = [ @@ -4048,6 +4855,12 @@ class GeneratedApiClient { * Deactivates a policy rule. */ deactivatePolicyRule(policyId, ruleId) { + if (!policyId) { + return Promise.reject(new Error('OKTA API deactivatePolicyRule parameter policyId is required.')); + } + if (!ruleId) { + return Promise.reject(new Error('OKTA API deactivatePolicyRule parameter ruleId is required.')); + } let url = `${this.baseUrl}/api/v1/policies/${policyId}/rules/${ruleId}/lifecycle/deactivate`; const resources = [ @@ -4075,6 +4888,9 @@ class GeneratedApiClient { * @returns {Promise} */ createSession(createSessionRequest) { + if (!createSessionRequest) { + return Promise.reject(new Error('OKTA API createSession parameter createSessionRequest is required.')); + } let url = `${this.baseUrl}/api/v1/sessions`; const resources = []; @@ -4096,6 +4912,9 @@ class GeneratedApiClient { * Convenience method for /api/v1/sessions/{sessionId} */ endSession(sessionId) { + if (!sessionId) { + return Promise.reject(new Error('OKTA API endSession parameter sessionId is required.')); + } let url = `${this.baseUrl}/api/v1/sessions/${sessionId}`; const resources = [ @@ -4118,6 +4937,9 @@ class GeneratedApiClient { * @returns {Promise} */ getSession(sessionId) { + if (!sessionId) { + return Promise.reject(new Error('OKTA API getSession parameter sessionId is required.')); + } let url = `${this.baseUrl}/api/v1/sessions/${sessionId}`; const resources = [ @@ -4140,6 +4962,9 @@ class GeneratedApiClient { * @returns {Promise} */ refreshSession(sessionId) { + if (!sessionId) { + return Promise.reject(new Error('OKTA API refreshSession parameter sessionId is required.')); + } let url = `${this.baseUrl}/api/v1/sessions/${sessionId}/lifecycle/refresh`; const resources = [ @@ -4183,6 +5008,9 @@ class GeneratedApiClient { * @returns {Promise} */ createSmsTemplate(smsTemplate) { + if (!smsTemplate) { + return Promise.reject(new Error('OKTA API createSmsTemplate parameter smsTemplate is required.')); + } let url = `${this.baseUrl}/api/v1/templates/sms`; const resources = []; @@ -4204,6 +5032,9 @@ class GeneratedApiClient { * Removes an SMS template. */ deleteSmsTemplate(templateId) { + if (!templateId) { + return Promise.reject(new Error('OKTA API deleteSmsTemplate parameter templateId is required.')); + } let url = `${this.baseUrl}/api/v1/templates/sms/${templateId}`; const resources = [ @@ -4226,6 +5057,9 @@ class GeneratedApiClient { * @returns {Promise} */ getSmsTemplate(templateId) { + if (!templateId) { + return Promise.reject(new Error('OKTA API getSmsTemplate parameter templateId is required.')); + } let url = `${this.baseUrl}/api/v1/templates/sms/${templateId}`; const resources = [ @@ -4249,6 +5083,12 @@ class GeneratedApiClient { * @returns {Promise} */ partialUpdateSmsTemplate(templateId, smsTemplate) { + if (!templateId) { + return Promise.reject(new Error('OKTA API partialUpdateSmsTemplate parameter templateId is required.')); + } + if (!smsTemplate) { + return Promise.reject(new Error('OKTA API partialUpdateSmsTemplate parameter smsTemplate is required.')); + } let url = `${this.baseUrl}/api/v1/templates/sms/${templateId}`; const resources = [ @@ -4274,6 +5114,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateSmsTemplate(templateId, smsTemplate) { + if (!templateId) { + return Promise.reject(new Error('OKTA API updateSmsTemplate parameter templateId is required.')); + } + if (!smsTemplate) { + return Promise.reject(new Error('OKTA API updateSmsTemplate parameter smsTemplate is required.')); + } let url = `${this.baseUrl}/api/v1/templates/sms/${templateId}`; const resources = [ @@ -4322,6 +5168,9 @@ class GeneratedApiClient { * @returns {Promise} */ createOrigin(trustedOrigin) { + if (!trustedOrigin) { + return Promise.reject(new Error('OKTA API createOrigin parameter trustedOrigin is required.')); + } let url = `${this.baseUrl}/api/v1/trustedOrigins`; const resources = []; @@ -4343,6 +5192,9 @@ class GeneratedApiClient { * Success */ deleteOrigin(trustedOriginId) { + if (!trustedOriginId) { + return Promise.reject(new Error('OKTA API deleteOrigin parameter trustedOriginId is required.')); + } let url = `${this.baseUrl}/api/v1/trustedOrigins/${trustedOriginId}`; const resources = [ @@ -4365,6 +5217,9 @@ class GeneratedApiClient { * @returns {Promise} */ getOrigin(trustedOriginId) { + if (!trustedOriginId) { + return Promise.reject(new Error('OKTA API getOrigin parameter trustedOriginId is required.')); + } let url = `${this.baseUrl}/api/v1/trustedOrigins/${trustedOriginId}`; const resources = [ @@ -4388,6 +5243,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateOrigin(trustedOriginId, trustedOrigin) { + if (!trustedOriginId) { + return Promise.reject(new Error('OKTA API updateOrigin parameter trustedOriginId is required.')); + } + if (!trustedOrigin) { + return Promise.reject(new Error('OKTA API updateOrigin parameter trustedOrigin is required.')); + } let url = `${this.baseUrl}/api/v1/trustedOrigins/${trustedOriginId}`; const resources = [ @@ -4412,6 +5273,9 @@ class GeneratedApiClient { * @returns {Promise} */ activateOrigin(trustedOriginId) { + if (!trustedOriginId) { + return Promise.reject(new Error('OKTA API activateOrigin parameter trustedOriginId is required.')); + } let url = `${this.baseUrl}/api/v1/trustedOrigins/${trustedOriginId}/lifecycle/activate`; const resources = [ @@ -4434,6 +5298,9 @@ class GeneratedApiClient { * @returns {Promise} */ deactivateOrigin(trustedOriginId) { + if (!trustedOriginId) { + return Promise.reject(new Error('OKTA API deactivateOrigin parameter trustedOriginId is required.')); + } let url = `${this.baseUrl}/api/v1/trustedOrigins/${trustedOriginId}/lifecycle/deactivate`; const resources = [ @@ -4487,6 +5354,9 @@ class GeneratedApiClient { * @returns {Promise} */ createUser(createUserRequest, queryParameters) { + if (!body) { + return Promise.reject(new Error('OKTA API createUser parameter body is required.')); + } let url = `${this.baseUrl}/api/v1/users`; const queryString = qs.stringify(queryParameters || {}); @@ -4513,6 +5383,15 @@ class GeneratedApiClient { * Convenience method for /api/v1/users/{associatedUserId}/linkedObjects/{primaryRelationshipName}/{primaryUserId} */ setLinkedObjectForUser(associatedUserId, primaryRelationshipName, primaryUserId) { + if (!associatedUserId) { + return Promise.reject(new Error('OKTA API setLinkedObjectForUser parameter associatedUserId is required.')); + } + if (!primaryRelationshipName) { + return Promise.reject(new Error('OKTA API setLinkedObjectForUser parameter primaryRelationshipName is required.')); + } + if (!primaryUserId) { + return Promise.reject(new Error('OKTA API setLinkedObjectForUser parameter primaryUserId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${associatedUserId}/linkedObjects/${primaryRelationshipName}/${primaryUserId}`; const resources = [ @@ -4542,6 +5421,9 @@ class GeneratedApiClient { * Deletes a user permanently. This operation can only be performed on users that have a `DEPROVISIONED` status. **This action cannot be recovered!** */ deactivateOrDeleteUser(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API deactivateOrDeleteUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}`; const queryString = qs.stringify(queryParameters || {}); @@ -4567,6 +5449,9 @@ class GeneratedApiClient { * @returns {Promise} */ getUser(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API getUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}`; const resources = [ @@ -4592,6 +5477,12 @@ class GeneratedApiClient { * @returns {Promise} */ partialUpdateUser(userId, user, queryParameters) { + if (!user) { + return Promise.reject(new Error('OKTA API partialUpdateUser parameter user is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API partialUpdateUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}`; const queryString = qs.stringify(queryParameters || {}); @@ -4622,6 +5513,12 @@ class GeneratedApiClient { * @returns {Promise} */ updateUser(userId, user, queryParameters) { + if (!user) { + return Promise.reject(new Error('OKTA API updateUser parameter user is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API updateUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}`; const queryString = qs.stringify(queryParameters || {}); @@ -4649,6 +5546,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link AppLink} instances. */ listAppLinks(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API listAppLinks parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/appLinks`; return new Collection( @@ -4666,6 +5566,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2Client} instances. */ listUserClients(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API listUserClients parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/clients`; return new Collection( @@ -4683,6 +5586,12 @@ class GeneratedApiClient { * Revokes all grants for the specified user and client */ revokeGrantsForUserAndClient(userId, clientId) { + if (!userId) { + return Promise.reject(new Error('OKTA API revokeGrantsForUserAndClient parameter userId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API revokeGrantsForUserAndClient parameter clientId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/clients/${clientId}/grants`; const resources = [ @@ -4711,6 +5620,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2ScopeConsentGrant} instances. */ listGrantsForUserAndClient(userId, clientId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API listGrantsForUserAndClient parameter userId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API listGrantsForUserAndClient parameter clientId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/clients/${clientId}/grants`; const queryString = qs.stringify(queryParameters || {}); @@ -4731,6 +5646,12 @@ class GeneratedApiClient { * Revokes all refresh tokens issued for the specified User and Client. */ revokeTokensForUserAndClient(userId, clientId) { + if (!userId) { + return Promise.reject(new Error('OKTA API revokeTokensForUserAndClient parameter userId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API revokeTokensForUserAndClient parameter clientId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/clients/${clientId}/tokens`; const resources = [ @@ -4759,6 +5680,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2RefreshToken} instances. */ listRefreshTokensForUserAndClient(userId, clientId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API listRefreshTokensForUserAndClient parameter userId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API listRefreshTokensForUserAndClient parameter clientId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/clients/${clientId}/tokens`; const queryString = qs.stringify(queryParameters || {}); @@ -4780,6 +5707,15 @@ class GeneratedApiClient { * Revokes the specified refresh token. */ revokeTokenForUserAndClient(userId, clientId, tokenId) { + if (!userId) { + return Promise.reject(new Error('OKTA API revokeTokenForUserAndClient parameter userId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API revokeTokenForUserAndClient parameter clientId is required.')); + } + if (!tokenId) { + return Promise.reject(new Error('OKTA API revokeTokenForUserAndClient parameter tokenId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/clients/${clientId}/tokens/${tokenId}`; const resources = [ @@ -4810,6 +5746,15 @@ class GeneratedApiClient { * @returns {Promise} */ getRefreshTokenForUserAndClient(userId, clientId, tokenId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API getRefreshTokenForUserAndClient parameter userId is required.')); + } + if (!clientId) { + return Promise.reject(new Error('OKTA API getRefreshTokenForUserAndClient parameter clientId is required.')); + } + if (!tokenId) { + return Promise.reject(new Error('OKTA API getRefreshTokenForUserAndClient parameter tokenId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/clients/${clientId}/tokens/${tokenId}`; const queryString = qs.stringify(queryParameters || {}); @@ -4840,6 +5785,12 @@ class GeneratedApiClient { * @returns {Promise} */ changePassword(userId, changePasswordRequest, queryParameters) { + if (!changePasswordRequest) { + return Promise.reject(new Error('OKTA API changePassword parameter changePasswordRequest is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API changePassword parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/credentials/change_password`; const queryString = qs.stringify(queryParameters || {}); @@ -4868,6 +5819,12 @@ class GeneratedApiClient { * @returns {Promise} */ changeRecoveryQuestion(userId, userCredentials) { + if (!userCredentials) { + return Promise.reject(new Error('OKTA API changeRecoveryQuestion parameter userCredentials is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API changeRecoveryQuestion parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/credentials/change_recovery_question`; const resources = [ @@ -4894,6 +5851,9 @@ class GeneratedApiClient { * @returns {Promise} */ forgotPasswordGenerateOneTimeToken(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API forgotPasswordGenerateOneTimeToken parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/credentials/forgot_password`; const queryString = qs.stringify(queryParameters || {}); @@ -4922,6 +5882,12 @@ class GeneratedApiClient { * @returns {Promise} */ forgotPasswordSetNewPassword(userId, userCredentials, queryParameters) { + if (!user) { + return Promise.reject(new Error('OKTA API forgotPasswordSetNewPassword parameter user is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API forgotPasswordSetNewPassword parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/credentials/forgot_password`; const queryString = qs.stringify(queryParameters || {}); @@ -4949,6 +5915,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link UserFactor} instances. */ listFactors(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API listFactors parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors`; return new Collection( @@ -4972,6 +5941,12 @@ class GeneratedApiClient { * @returns {Promise} */ enrollFactor(userId, userFactor, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API enrollFactor parameter userId is required.')); + } + if (!body) { + return Promise.reject(new Error('OKTA API enrollFactor parameter body is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors`; const queryString = qs.stringify(queryParameters || {}); @@ -4999,6 +5974,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link UserFactor} instances. */ listSupportedFactors(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API listSupportedFactors parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors/catalog`; return new Collection( @@ -5016,6 +5994,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link SecurityQuestion} instances. */ listSupportedSecurityQuestions(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API listSupportedSecurityQuestions parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors/questions`; return new Collection( @@ -5033,6 +6014,12 @@ class GeneratedApiClient { * Unenrolls an existing factor for the specified user, allowing the user to enroll a new factor. */ deleteFactor(userId, factorId) { + if (!userId) { + return Promise.reject(new Error('OKTA API deleteFactor parameter userId is required.')); + } + if (!factorId) { + return Promise.reject(new Error('OKTA API deleteFactor parameter factorId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors/${factorId}`; const resources = [ @@ -5057,6 +6044,12 @@ class GeneratedApiClient { * @returns {Promise} */ getFactor(userId, factorId) { + if (!userId) { + return Promise.reject(new Error('OKTA API getFactor parameter userId is required.')); + } + if (!factorId) { + return Promise.reject(new Error('OKTA API getFactor parameter factorId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors/${factorId}`; const resources = [ @@ -5082,6 +6075,12 @@ class GeneratedApiClient { * @returns {Promise} */ activateFactor(userId, factorId, activateFactorRequest) { + if (!userId) { + return Promise.reject(new Error('OKTA API activateFactor parameter userId is required.')); + } + if (!factorId) { + return Promise.reject(new Error('OKTA API activateFactor parameter factorId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors/${factorId}/lifecycle/activate`; const resources = [ @@ -5109,6 +6108,15 @@ class GeneratedApiClient { * @returns {Promise} */ getFactorTransactionStatus(userId, factorId, transactionId) { + if (!userId) { + return Promise.reject(new Error('OKTA API getFactorTransactionStatus parameter userId is required.')); + } + if (!factorId) { + return Promise.reject(new Error('OKTA API getFactorTransactionStatus parameter factorId is required.')); + } + if (!transactionId) { + return Promise.reject(new Error('OKTA API getFactorTransactionStatus parameter transactionId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors/${factorId}/transactions/${transactionId}`; const resources = [ @@ -5138,6 +6146,12 @@ class GeneratedApiClient { * @returns {Promise} */ verifyFactor(userId, factorId, verifyFactorRequest, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API verifyFactor parameter userId is required.')); + } + if (!factorId) { + return Promise.reject(new Error('OKTA API verifyFactor parameter factorId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/factors/${factorId}/verify`; const queryString = qs.stringify(queryParameters || {}); @@ -5165,6 +6179,9 @@ class GeneratedApiClient { * Revokes all grants for a specified user */ revokeUserGrants(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API revokeUserGrants parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/grants`; const resources = [ @@ -5192,6 +6209,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link OAuth2ScopeConsentGrant} instances. */ listUserGrants(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API listUserGrants parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/grants`; const queryString = qs.stringify(queryParameters || {}); @@ -5212,6 +6232,12 @@ class GeneratedApiClient { * Revokes one grant for a specified user */ revokeUserGrant(userId, grantId) { + if (!userId) { + return Promise.reject(new Error('OKTA API revokeUserGrant parameter userId is required.')); + } + if (!grantId) { + return Promise.reject(new Error('OKTA API revokeUserGrant parameter grantId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/grants/${grantId}`; const resources = [ @@ -5238,6 +6264,12 @@ class GeneratedApiClient { * @returns {Promise} */ getUserGrant(userId, grantId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API getUserGrant parameter userId is required.')); + } + if (!grantId) { + return Promise.reject(new Error('OKTA API getUserGrant parameter grantId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/grants/${grantId}`; const queryString = qs.stringify(queryParameters || {}); @@ -5264,6 +6296,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Group} instances. */ listUserGroups(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API listUserGroups parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/groups`; return new Collection( @@ -5281,6 +6316,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link IdentityProvider} instances. */ listUserIdentityProviders(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API listUserIdentityProviders parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/idps`; return new Collection( @@ -5300,6 +6338,12 @@ class GeneratedApiClient { * @returns {Promise} */ activateUser(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API activateUser parameter userId is required.')); + } + if (!sendEmail) { + return Promise.reject(new Error('OKTA API activateUser parameter sendEmail is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/activate`; const queryString = qs.stringify(queryParameters || {}); @@ -5326,6 +6370,9 @@ class GeneratedApiClient { * Deactivates a user. This operation can only be performed on users that do not have a `DEPROVISIONED` status. Deactivation of a user is an asynchronous operation. The user will have the `transitioningToStatus` property with a value of `DEPROVISIONED` during deactivation to indicate that the user hasn't completed the asynchronous operation. The user will have a status of `DEPROVISIONED` when the deactivation process is complete. */ deactivateUser(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API deactivateUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/deactivate`; const queryString = qs.stringify(queryParameters || {}); @@ -5355,6 +6402,9 @@ class GeneratedApiClient { * @returns {Promise} */ expirePassword(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API expirePassword parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/expire_password?tempPassword=false`; const resources = [ @@ -5377,6 +6427,9 @@ class GeneratedApiClient { * @returns {Promise} */ expirePasswordAndGetTemporaryPassword(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API expirePasswordAndGetTemporaryPassword parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/expire_password?tempPassword=true`; const resources = [ @@ -5401,6 +6454,9 @@ class GeneratedApiClient { * @returns {Promise} */ reactivateUser(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API reactivateUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/reactivate`; const queryString = qs.stringify(queryParameters || {}); @@ -5425,6 +6481,9 @@ class GeneratedApiClient { * This operation resets all factors for the specified user. All MFA factor enrollments returned to the unenrolled state. The user's status remains ACTIVE. This link is present only if the user is currently enrolled in one or more MFA factors. */ resetFactors(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API resetFactors parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/reset_factors`; const resources = [ @@ -5453,6 +6512,12 @@ class GeneratedApiClient { * @returns {Promise} */ resetPassword(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API resetPassword parameter userId is required.')); + } + if (!sendEmail) { + return Promise.reject(new Error('OKTA API resetPassword parameter sendEmail is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/reset_password`; const queryString = qs.stringify(queryParameters || {}); @@ -5477,6 +6542,9 @@ class GeneratedApiClient { * Suspends a user. This operation can only be performed on users with an `ACTIVE` status. The user will have a status of `SUSPENDED` when the process is complete. */ suspendUser(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API suspendUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/suspend`; const resources = [ @@ -5502,6 +6570,9 @@ class GeneratedApiClient { * Unlocks a user with a `LOCKED_OUT` status and returns them to `ACTIVE` status. Users will be able to login with their current password. */ unlockUser(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API unlockUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/unlock`; const resources = [ @@ -5527,6 +6598,9 @@ class GeneratedApiClient { * Unsuspends a user and returns them to the `ACTIVE` state. This operation can only be performed on users that have a `SUSPENDED` status. */ unsuspendUser(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API unsuspendUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/unsuspend`; const resources = [ @@ -5553,6 +6627,12 @@ class GeneratedApiClient { * Delete linked objects for a user, relationshipName can be ONLY a primary relationship name */ removeLinkedObjectForUser(userId, relationshipName) { + if (!userId) { + return Promise.reject(new Error('OKTA API removeLinkedObjectForUser parameter userId is required.')); + } + if (!relationshipName) { + return Promise.reject(new Error('OKTA API removeLinkedObjectForUser parameter relationshipName is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/linkedObjects/${relationshipName}`; const resources = [ @@ -5580,6 +6660,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link ResponseLinks} instances. */ getLinkedObjectsForUser(userId, relationshipName, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API getLinkedObjectsForUser parameter userId is required.')); + } + if (!relationshipName) { + return Promise.reject(new Error('OKTA API getLinkedObjectsForUser parameter relationshipName is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/linkedObjects/${relationshipName}`; const queryString = qs.stringify(queryParameters || {}); @@ -5602,6 +6688,9 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Role} instances. */ listAssignedRolesForUser(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API listAssignedRolesForUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles`; const queryString = qs.stringify(queryParameters || {}); @@ -5625,6 +6714,12 @@ class GeneratedApiClient { * @returns {Promise} */ assignRoleToUser(userId, assignRoleRequest, queryParameters) { + if (!assignRoleRequest) { + return Promise.reject(new Error('OKTA API assignRoleToUser parameter assignRoleRequest is required.')); + } + if (!userId) { + return Promise.reject(new Error('OKTA API assignRoleToUser parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles`; const queryString = qs.stringify(queryParameters || {}); @@ -5652,6 +6747,12 @@ class GeneratedApiClient { * Unassigns a role from a user. */ removeRoleFromUser(userId, roleId) { + if (!userId) { + return Promise.reject(new Error('OKTA API removeRoleFromUser parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API removeRoleFromUser parameter roleId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}`; const resources = [ @@ -5679,6 +6780,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link CatalogApplication} instances. */ listApplicationTargetsForApplicationAdministratorRoleForUser(userId, roleId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API listApplicationTargetsForApplicationAdministratorRoleForUser parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API listApplicationTargetsForApplicationAdministratorRoleForUser parameter roleId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/catalog/apps`; const queryString = qs.stringify(queryParameters || {}); @@ -5699,6 +6806,12 @@ class GeneratedApiClient { * Success */ addAllAppsAsTargetToRole(userId, roleId) { + if (!userId) { + return Promise.reject(new Error('OKTA API addAllAppsAsTargetToRole parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API addAllAppsAsTargetToRole parameter roleId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/catalog/apps`; const resources = [ @@ -5727,6 +6840,15 @@ class GeneratedApiClient { * Success */ removeApplicationTargetFromApplicationAdministratorRoleForUser(userId, roleId, appName) { + if (!userId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromApplicationAdministratorRoleForUser parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromApplicationAdministratorRoleForUser parameter roleId is required.')); + } + if (!appName) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromApplicationAdministratorRoleForUser parameter appName is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/catalog/apps/${appName}`; const resources = [ @@ -5752,6 +6874,15 @@ class GeneratedApiClient { * Success */ addApplicationTargetToAdminRoleForUser(userId, roleId, appName) { + if (!userId) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAdminRoleForUser parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAdminRoleForUser parameter roleId is required.')); + } + if (!appName) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAdminRoleForUser parameter appName is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/catalog/apps/${appName}`; const resources = [ @@ -5782,6 +6913,18 @@ class GeneratedApiClient { * Remove App Instance Target to App Administrator Role given to a User */ removeApplicationTargetFromAdministratorRoleForUser(userId, roleId, appName, applicationId) { + if (!userId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromAdministratorRoleForUser parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromAdministratorRoleForUser parameter roleId is required.')); + } + if (!appName) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromAdministratorRoleForUser parameter appName is required.')); + } + if (!applicationId) { + return Promise.reject(new Error('OKTA API removeApplicationTargetFromAdministratorRoleForUser parameter applicationId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/catalog/apps/${appName}/${applicationId}`; const resources = [ @@ -5809,6 +6952,18 @@ class GeneratedApiClient { * Add App Instance Target to App Administrator Role given to a User */ addApplicationTargetToAppAdminRoleForUser(userId, roleId, appName, applicationId) { + if (!userId) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAppAdminRoleForUser parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAppAdminRoleForUser parameter roleId is required.')); + } + if (!appName) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAppAdminRoleForUser parameter appName is required.')); + } + if (!applicationId) { + return Promise.reject(new Error('OKTA API addApplicationTargetToAppAdminRoleForUser parameter applicationId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/catalog/apps/${appName}/${applicationId}`; const resources = [ @@ -5842,6 +6997,12 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Group} instances. */ listGroupTargetsForRole(userId, roleId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API listGroupTargetsForRole parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API listGroupTargetsForRole parameter roleId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/groups`; const queryString = qs.stringify(queryParameters || {}); @@ -5863,6 +7024,15 @@ class GeneratedApiClient { * Success */ removeGroupTargetFromRole(userId, roleId, groupId) { + if (!userId) { + return Promise.reject(new Error('OKTA API removeGroupTargetFromRole parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API removeGroupTargetFromRole parameter roleId is required.')); + } + if (!groupId) { + return Promise.reject(new Error('OKTA API removeGroupTargetFromRole parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/groups/${groupId}`; const resources = [ @@ -5888,6 +7058,15 @@ class GeneratedApiClient { * Success */ addGroupTargetToRole(userId, roleId, groupId) { + if (!userId) { + return Promise.reject(new Error('OKTA API addGroupTargetToRole parameter userId is required.')); + } + if (!roleId) { + return Promise.reject(new Error('OKTA API addGroupTargetToRole parameter roleId is required.')); + } + if (!groupId) { + return Promise.reject(new Error('OKTA API addGroupTargetToRole parameter groupId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/roles/${roleId}/targets/groups/${groupId}`; const resources = [ @@ -5917,6 +7096,9 @@ class GeneratedApiClient { * Removes all active identity provider sessions. This forces the user to authenticate on the next operation. Optionally revokes OpenID Connect and OAuth refresh and access tokens issued to the user. */ clearUserSessions(userId, queryParameters) { + if (!userId) { + return Promise.reject(new Error('OKTA API clearUserSessions parameter userId is required.')); + } let url = `${this.baseUrl}/api/v1/users/${userId}/sessions`; const queryString = qs.stringify(queryParameters || {}); diff --git a/templates/generated-client.js.hbs b/templates/generated-client.js.hbs index e35381ba9..03226422a 100644 --- a/templates/generated-client.js.hbs +++ b/templates/generated-client.js.hbs @@ -19,6 +19,11 @@ class GeneratedApiClient { {{{jsdocBuilder this}}} */ {{operationId}}({{operationArgumentBuilder this}}) { + {{#each (getRequiredOperationParams this)}} + if (!{{name}}) { + return Promise.reject(new Error('OKTA API {{../operationId}} parameter {{name}} is required.')); + } + {{/each}} let url = `${this.baseUrl}{{replacePathParams path}}`; {{#if queryParams.length}} const queryString = qs.stringify(queryParameters || {}); diff --git a/templates/helpers/operation.js b/templates/helpers/operation.js index e3332cab4..86dfbdf7d 100644 --- a/templates/helpers/operation.js +++ b/templates/helpers/operation.js @@ -34,6 +34,10 @@ const operationArgumentBuilder = (operation) => { return args.join(', '); } +const getRequiredOperationParams = operation => { + return operation.parameters.filter(param => param.required); +} + const getHttpMethod = ({ consumes, produces, method, responseModel }) => { let res; switch (method) { @@ -119,6 +123,7 @@ const jsdocBuilder = (operation) => { module.exports = { getBodyModelNameInCamelCase, operationArgumentBuilder, + getRequiredOperationParams, hasRequest, hasHeaders, getHttpMethod, From 72a9b8d331a96a4f9f2e1ba2e2e6a48ae2add43e Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 8 Oct 2020 12:25:05 -0400 Subject: [PATCH 2/6] add changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e212cd9ed..d709e5d3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Okta Node SDK Changelog +## Pending + +- [#205](https://github.com/okta/okta-sdk-nodejs/pull/205) Supports required params validation + ## 4.0.0 - [#167](https://github.com/okta/okta-sdk-nodejs/pull/167) Drop support for Node 8 From 6afd0a0d9ed520ef272eb889e0c4d8368d3d40dd Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 8 Oct 2020 13:00:38 -0400 Subject: [PATCH 3/6] remove unused args validation --- src/generated-client.js | 39 ---------------------------------- templates/helpers/operation.js | 12 +++++++++-- 2 files changed, 10 insertions(+), 41 deletions(-) diff --git a/src/generated-client.js b/src/generated-client.js index b3f7e295a..c7165620f 100644 --- a/src/generated-client.js +++ b/src/generated-client.js @@ -200,9 +200,6 @@ class GeneratedApiClient { if (!appId) { return Promise.reject(new Error('OKTA API generateCsrForApplication parameter appId is required.')); } - if (!metadata) { - return Promise.reject(new Error('OKTA API generateCsrForApplication parameter metadata is required.')); - } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/csrs`; const resources = [ @@ -570,9 +567,6 @@ class GeneratedApiClient { if (!keyId) { return Promise.reject(new Error('OKTA API cloneApplicationKey parameter keyId is required.')); } - if (!targetAid) { - return Promise.reject(new Error('OKTA API cloneApplicationKey parameter targetAid is required.')); - } let url = `${this.baseUrl}/api/v1/apps/${appId}/credentials/keys/${keyId}/clone`; const queryString = qs.stringify(queryParameters || {}); @@ -1635,9 +1629,6 @@ class GeneratedApiClient { if (!authServerId) { return Promise.reject(new Error('OKTA API rotateAuthorizationServerKeys parameter authServerId is required.')); } - if (!use) { - return Promise.reject(new Error('OKTA API rotateAuthorizationServerKeys parameter use is required.')); - } let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/credentials/lifecycle/keyRotate`; return new Collection( @@ -3412,9 +3403,6 @@ class GeneratedApiClient { if (!idpId) { return Promise.reject(new Error('OKTA API generateCsrForIdentityProvider parameter idpId is required.')); } - if (!metadata) { - return Promise.reject(new Error('OKTA API generateCsrForIdentityProvider parameter metadata is required.')); - } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/csrs`; const resources = [ @@ -3718,9 +3706,6 @@ class GeneratedApiClient { if (!idpId) { return Promise.reject(new Error('OKTA API generateIdentityProviderSigningKey parameter idpId is required.')); } - if (!validityYears) { - return Promise.reject(new Error('OKTA API generateIdentityProviderSigningKey parameter validityYears is required.')); - } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/keys/generate`; const queryString = qs.stringify(queryParameters || {}); @@ -3785,9 +3770,6 @@ class GeneratedApiClient { if (!keyId) { return Promise.reject(new Error('OKTA API cloneIdentityProviderKey parameter keyId is required.')); } - if (!targetIdpId) { - return Promise.reject(new Error('OKTA API cloneIdentityProviderKey parameter targetIdpId is required.')); - } let url = `${this.baseUrl}/api/v1/idps/${idpId}/credentials/keys/${keyId}/clone`; const queryString = qs.stringify(queryParameters || {}); @@ -4133,9 +4115,6 @@ class GeneratedApiClient { if (!inlineHookId) { return Promise.reject(new Error('OKTA API executeInlineHook parameter inlineHookId is required.')); } - if (!payloadData) { - return Promise.reject(new Error('OKTA API executeInlineHook parameter payloadData is required.')); - } let url = `${this.baseUrl}/api/v1/inlineHooks/${inlineHookId}/execute`; const resources = [ @@ -4482,9 +4461,6 @@ class GeneratedApiClient { * @returns {Promise} A collection that will yield {@link Policy} instances. */ listPolicies(queryParameters) { - if (!type) { - return Promise.reject(new Error('OKTA API listPolicies parameter type is required.')); - } let url = `${this.baseUrl}/api/v1/policies`; const queryString = qs.stringify(queryParameters || {}); @@ -5354,9 +5330,6 @@ class GeneratedApiClient { * @returns {Promise} */ createUser(createUserRequest, queryParameters) { - if (!body) { - return Promise.reject(new Error('OKTA API createUser parameter body is required.')); - } let url = `${this.baseUrl}/api/v1/users`; const queryString = qs.stringify(queryParameters || {}); @@ -5882,9 +5855,6 @@ class GeneratedApiClient { * @returns {Promise} */ forgotPasswordSetNewPassword(userId, userCredentials, queryParameters) { - if (!user) { - return Promise.reject(new Error('OKTA API forgotPasswordSetNewPassword parameter user is required.')); - } if (!userId) { return Promise.reject(new Error('OKTA API forgotPasswordSetNewPassword parameter userId is required.')); } @@ -5944,9 +5914,6 @@ class GeneratedApiClient { if (!userId) { return Promise.reject(new Error('OKTA API enrollFactor parameter userId is required.')); } - if (!body) { - return Promise.reject(new Error('OKTA API enrollFactor parameter body is required.')); - } let url = `${this.baseUrl}/api/v1/users/${userId}/factors`; const queryString = qs.stringify(queryParameters || {}); @@ -6341,9 +6308,6 @@ class GeneratedApiClient { if (!userId) { return Promise.reject(new Error('OKTA API activateUser parameter userId is required.')); } - if (!sendEmail) { - return Promise.reject(new Error('OKTA API activateUser parameter sendEmail is required.')); - } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/activate`; const queryString = qs.stringify(queryParameters || {}); @@ -6515,9 +6479,6 @@ class GeneratedApiClient { if (!userId) { return Promise.reject(new Error('OKTA API resetPassword parameter userId is required.')); } - if (!sendEmail) { - return Promise.reject(new Error('OKTA API resetPassword parameter sendEmail is required.')); - } let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/reset_password`; const queryString = qs.stringify(queryParameters || {}); diff --git a/templates/helpers/operation.js b/templates/helpers/operation.js index 86dfbdf7d..4c3a1c3a6 100644 --- a/templates/helpers/operation.js +++ b/templates/helpers/operation.js @@ -12,7 +12,7 @@ const getBodyModelNameInCamelCase = operation => { return _.camelCase(bodyModelName); }; -const operationArgumentBuilder = (operation) => { +const getOperationArgument = operation => { const { bodyModel, method, pathParams, queryParams } = operation; const args = pathParams.reduce((acc, curr) => { @@ -31,11 +31,19 @@ const operationArgumentBuilder = (operation) => { args.push('queryParameters'); } + return args; +} + +const operationArgumentBuilder = (operation) => { + const args = getOperationArgument(operation); return args.join(', '); } const getRequiredOperationParams = operation => { - return operation.parameters.filter(param => param.required); + const args = getOperationArgument(operation); + return operation.parameters.filter(({ name, required }) => { + return args.includes(name) && required; + }); } const getHttpMethod = ({ consumes, produces, method, responseModel }) => { From 86828ceec0a35719da519477c5cd070eec99b2ed Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 8 Oct 2020 14:35:20 -0400 Subject: [PATCH 4/6] upgrade openapi to 2.1.0 --- package.json | 2 +- src/factories/UserFactorFactory.js | 1 + src/generated-client.js | 3 - src/models/AcsEndpoint.js | 33 +++ src/models/CustomHotpUserFactor.js | 35 +++ src/models/CustomHotpUserFactorProfile.js | 32 +++ src/models/PasswordCredentialHash.js | 2 +- src/models/SamlApplicationSettingsSignOn.js | 2 + src/models/index.js | 3 + test/utils.js | 4 + yarn.lock | 300 ++++++++++++-------- 11 files changed, 295 insertions(+), 122 deletions(-) create mode 100644 src/models/AcsEndpoint.js create mode 100644 src/models/CustomHotpUserFactor.js create mode 100644 src/models/CustomHotpUserFactorProfile.js diff --git a/package.json b/package.json index bbda0e56b..a322ec4df 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "rasha": "^1.2.5" }, "devDependencies": { - "@okta/openapi": "^2.0.0", + "@okta/openapi": "^2.1.0", "chai": "^3.5.0", "eslint": "^3.19.0", "eslint-plugin-jest": "^21.17.0", diff --git a/src/factories/UserFactorFactory.js b/src/factories/UserFactorFactory.js index 9fc3cac07..9c5f4c221 100644 --- a/src/factories/UserFactorFactory.js +++ b/src/factories/UserFactorFactory.js @@ -23,6 +23,7 @@ class UserFactorFactory extends ModelResolutionFactory { return { 'call': models.CallUserFactor, 'email': models.EmailUserFactor, + 'hotp': models.CustomHotpUserFactor, 'push': models.PushUserFactor, 'question': models.SecurityQuestionUserFactor, 'sms': models.SmsUserFactor, diff --git a/src/generated-client.js b/src/generated-client.js index c7165620f..9fe68f42a 100644 --- a/src/generated-client.js +++ b/src/generated-client.js @@ -813,9 +813,6 @@ class GeneratedApiClient { if (!groupId) { return Promise.reject(new Error('OKTA API createApplicationGroupAssignment parameter groupId is required.')); } - if (!applicationGroupAssignment) { - return Promise.reject(new Error('OKTA API createApplicationGroupAssignment parameter applicationGroupAssignment is required.')); - } let url = `${this.baseUrl}/api/v1/apps/${appId}/groups/${groupId}`; const resources = [ diff --git a/src/models/AcsEndpoint.js b/src/models/AcsEndpoint.js new file mode 100644 index 000000000..088cd0b8b --- /dev/null +++ b/src/models/AcsEndpoint.js @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-2020, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + */ + + +/* THIS FILE IS AUTO-GENERATED - SEE CONTRIBUTOR DOCUMENTATION */ + +var Resource = require('../resource'); + + +/** + * @class AcsEndpoint + * @extends Resource + * @property { integer } index + * @property { string } url + */ +class AcsEndpoint extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + +} + +module.exports = AcsEndpoint; diff --git a/src/models/CustomHotpUserFactor.js b/src/models/CustomHotpUserFactor.js new file mode 100644 index 000000000..ead46d9e2 --- /dev/null +++ b/src/models/CustomHotpUserFactor.js @@ -0,0 +1,35 @@ +/*! + * Copyright (c) 2017-2020, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + */ + + +/* THIS FILE IS AUTO-GENERATED - SEE CONTRIBUTOR DOCUMENTATION */ + +var UserFactor = require('./UserFactor'); +const CustomHotpUserFactorProfile = require('./CustomHotpUserFactorProfile'); + +/** + * @class CustomHotpUserFactor + * @extends UserFactor + * @property { string } factorProfileId + * @property { CustomHotpUserFactorProfile } profile + */ +class CustomHotpUserFactor extends UserFactor { + constructor(resourceJson, client) { + super(resourceJson, client); + if (resourceJson && resourceJson.profile) { + this.profile = new CustomHotpUserFactorProfile(resourceJson.profile); + } + } + +} + +module.exports = CustomHotpUserFactor; diff --git a/src/models/CustomHotpUserFactorProfile.js b/src/models/CustomHotpUserFactorProfile.js new file mode 100644 index 000000000..bbc02cf44 --- /dev/null +++ b/src/models/CustomHotpUserFactorProfile.js @@ -0,0 +1,32 @@ +/*! + * Copyright (c) 2017-2020, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + */ + + +/* THIS FILE IS AUTO-GENERATED - SEE CONTRIBUTOR DOCUMENTATION */ + +var Resource = require('../resource'); + + +/** + * @class CustomHotpUserFactorProfile + * @extends Resource + * @property { string } sharedSecret + */ +class CustomHotpUserFactorProfile extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + +} + +module.exports = CustomHotpUserFactorProfile; diff --git a/src/models/PasswordCredentialHash.js b/src/models/PasswordCredentialHash.js index 7317f2477..b489fc5e2 100644 --- a/src/models/PasswordCredentialHash.js +++ b/src/models/PasswordCredentialHash.js @@ -23,7 +23,7 @@ var Resource = require('../resource'); * @property { string } salt * @property { string } saltOrder * @property { string } value - * @property { integer } workerFactor + * @property { integer } workFactor */ class PasswordCredentialHash extends Resource { constructor(resourceJson, client) { diff --git a/src/models/SamlApplicationSettingsSignOn.js b/src/models/SamlApplicationSettingsSignOn.js index 3deb7bfb8..01b82a580 100644 --- a/src/models/SamlApplicationSettingsSignOn.js +++ b/src/models/SamlApplicationSettingsSignOn.js @@ -19,6 +19,8 @@ var Resource = require('../resource'); /** * @class SamlApplicationSettingsSignOn * @extends Resource + * @property { array } acsEndpoints + * @property { boolean } allowMultipleAcsEndpoints * @property { boolean } assertionSigned * @property { array } attributeStatements * @property { string } audience diff --git a/src/models/index.js b/src/models/index.js index cff3290b1..0f9a3db37 100644 --- a/src/models/index.js +++ b/src/models/index.js @@ -15,6 +15,7 @@ * THIS FILE IS AUTO-GENERATED - SEE CONTRIBUTOR DOCUMENTATION */ +exports.AcsEndpoint = require('./AcsEndpoint'); exports.ActivateFactorRequest = require('./ActivateFactorRequest'); exports.AppAndInstanceConditionEvaluatorAppOrInstance = require('./AppAndInstanceConditionEvaluatorAppOrInstance'); exports.AppAndInstancePolicyRuleCondition = require('./AppAndInstancePolicyRuleCondition'); @@ -73,6 +74,8 @@ exports.Csr = require('./Csr'); exports.CsrMetadata = require('./CsrMetadata'); exports.CsrMetadataSubject = require('./CsrMetadataSubject'); exports.CsrMetadataSubjectAltNames = require('./CsrMetadataSubjectAltNames'); +exports.CustomHotpUserFactor = require('./CustomHotpUserFactor'); +exports.CustomHotpUserFactorProfile = require('./CustomHotpUserFactorProfile'); exports.DevicePolicyRuleCondition = require('./DevicePolicyRuleCondition'); exports.DevicePolicyRuleConditionPlatform = require('./DevicePolicyRuleConditionPlatform'); exports.Duration = require('./Duration'); diff --git a/test/utils.js b/test/utils.js index 13c8093ad..8380ff7a1 100644 --- a/test/utils.js +++ b/test/utils.js @@ -118,6 +118,10 @@ async function isGroupTargetPresent(user, userGroup, role) { } async function cleanupUser(client, user) { + if (!user.profile.login) { + return; + } + try { const existingUser = await client.getUser(user.profile.login); await existingUser.deactivate(); diff --git a/yarn.lock b/yarn.lock index cae187fd2..81120f73d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,10 +23,10 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" integrity sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A== -"@okta/openapi@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@okta/openapi/-/openapi-2.0.0.tgz#9640ed3285fc5d37592446d6c0c75cd7ca8d4b15" - integrity sha512-K7ovcz6Imzfo8mF2qK7/4fhYgvAxWIdGVrIJffi/9du0zcADeCSn+Cn1rzz0Jnj6YODlTXgtAUMbvB5xSkE9kA== +"@okta/openapi@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@okta/openapi/-/openapi-2.1.0.tgz#3beee2f46fd6b8c1b28ca4f89cfdcd6d57c13586" + integrity sha512-ik14wFi2K0nNLwNolksjzicn/LSTrYQPe6AxQ0eeqQIa8QE9WRFbhkfdBzOFR3zdDNlD2K4NUFm5eDpJTYqNgA== dependencies: commander "2.9.0" fs-extra "3.0.1" @@ -153,10 +153,10 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== ansi-styles@^2.2.1: version "2.2.1" @@ -170,6 +170,13 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -695,6 +702,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chownr@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" @@ -750,14 +765,14 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" co@^4.6.0: version "4.6.0" @@ -784,11 +799,23 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -803,7 +830,7 @@ commander@2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.7.1, commander@~2.20.3: +commander@^2.7.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -1108,10 +1135,10 @@ ecdsa-sig-formatter@^1.0.5: dependencies: safe-buffer "^5.0.1" -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== encoding@^0.1.11: version "0.1.12" @@ -1590,12 +1617,13 @@ find-up@^2.1.0: dependencies: locate-path "^2.0.0" -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: - locate-path "^3.0.0" + locate-path "^5.0.0" + path-exists "^4.0.0" flat-cache@^1.2.1: version "1.3.4" @@ -1799,11 +1827,16 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.9: version "4.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== +graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + "graceful-readlink@>= 1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" @@ -1872,6 +1905,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" @@ -2186,6 +2224,11 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + is-generator-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" @@ -2741,7 +2784,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.5.1, js-yaml@^3.7.0: +js-yaml@^3.13.0, js-yaml@^3.5.1, js-yaml@^3.7.0: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -2749,6 +2792,14 @@ js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.5.1, js-yaml@^3.7.0: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^3.13.1: + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js2xmlparser@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-4.0.0.tgz#ae14cc711b2892083eed6e219fbc993d858bc3a5" @@ -2818,14 +2869,14 @@ jsesc@^1.3.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= -json-schema-ref-parser@^7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-7.1.2.tgz#b0b324a7453d4102a271ca23cbc18c9d0d187062" - integrity sha512-bi2Nns2UqdX7wThX5qSHd+lOxlu9oeJvlCnWGuR3qS4Ex4UZtuwygkyq/43J31GuNGX8xBHeV6zjQztYk/G5VA== +json-schema-ref-parser@^7.1.3: + version "7.1.4" + resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-7.1.4.tgz#abb3f2613911e9060dc2268477b40591753facf0" + integrity sha512-AD7bvav0vak1/63w3jH8F7eHId/4E4EPdMAEZhGxtjktteUv9dnNB/cJy6nVnMyoTPBJnLwFK6tiQPSTeleCtQ== dependencies: call-me-maybe "^1.0.1" js-yaml "^3.13.1" - ono "^5.1.0" + ono "^6.0.0" json-schema-traverse@^0.4.1: version "0.4.1" @@ -2985,13 +3036,12 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" + p-locate "^4.1.0" lodash._baseassign@^3.0.0: version "3.2.0" @@ -3316,13 +3366,20 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@0.5.1, mkdirp@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" +mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + mocha@^3.4.1: version "3.5.3" resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d" @@ -3398,9 +3455,9 @@ needle@^2.2.1: sax "^1.2.4" neo-async@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" - integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== next-tick@^1.0.0: version "1.0.0" @@ -3440,9 +3497,9 @@ node-fetch@^1.0.1: is-stream "^1.0.1" node-fetch@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" - integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== node-int64@^0.4.0: version "0.4.0" @@ -3645,10 +3702,10 @@ onetime@^1.0.0: resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" integrity sha1-ofeDj4MUxRbwXs78vEzP4EtO14k= -ono@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ono/-/ono-5.1.0.tgz#8cafa7e56afa2211ad63dd2eb798427e64f1a070" - integrity sha512-GgqRIUWErLX4l9Up0khRtbrlH8Fyj59A0nKv8V6pWEto38aUgnOGOOF7UmgFFLzFnDSc8REzaTXOc0hqEe7yIw== +ono@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ono/-/ono-6.0.1.tgz#1bc14ffb8af1e5db3f7397f75b88e4a2d64bbd71" + integrity sha512-5rdYW/106kHqLeG22GE2MHKq+FlsxMERZev9DCzQX1zwkxnFwBivSn5i17a5O/rDmOJOdf4Wyt80UZljzx9+DA== openapi-schemas@^1.0.2: version "1.0.3" @@ -3736,10 +3793,10 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" - integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" @@ -3750,12 +3807,12 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: - p-limit "^2.0.0" + p-limit "^2.2.0" p-try@^1.0.0: version "1.0.0" @@ -3813,6 +3870,11 @@ path-exists@^3.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -4615,14 +4677,14 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" string.prototype.trimleft@^2.1.0: version "2.1.0" @@ -4668,12 +4730,12 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== dependencies: - ansi-regex "^4.1.0" + ansi-regex "^5.0.0" strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" @@ -4735,34 +4797,41 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + swagger-cli@^2.3.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/swagger-cli/-/swagger-cli-2.3.3.tgz#94a71cb4ee47821e2638c8c270b78d12d1c957b3" - integrity sha512-He4hZRQ6BPw+ITHJAP+ymQJv9KE8zL6YKaXAEAeMC8E6MVeQ5VZ8OTjjKE+b8EFZjDTxkppDzLQIsD0YvxaHJQ== + version "2.3.5" + resolved "https://registry.yarnpkg.com/swagger-cli/-/swagger-cli-2.3.5.tgz#a7ae08ae9abe4cc4aaab0334c57166a2cb377fd3" + integrity sha512-UL3S053zT0P9prYJj2zaiokER2KxJh2GWTJ12SbBAJZnlUKJrUZn3qK+zVc/i/bUcyrRRttA4cp8Lzk6cNm0nw== dependencies: - chalk "^2.4.2" + chalk "^3.0.0" js-yaml "^3.13.1" mkdirp "^0.5.1" - swagger-parser "^8.0.3" - yargs "^14.2.0" + swagger-parser "^8.0.4" + yargs "^15.0.2" swagger-methods@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/swagger-methods/-/swagger-methods-2.0.2.tgz#5891d5536e54d5ba8e7ae1007acc9170f41c9590" integrity sha512-/RNqvBZkH8+3S/FqBPejHxJxZenaYq3MrpeXnzi06aDIS39Mqf5YCUNb/ZBjsvFFt8h9FxfKs8EXPtcYdfLiRg== -swagger-parser@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-8.0.3.tgz#2f577527c5307d94050785cfb8939aaefe3575d8" - integrity sha512-y2gw+rTjn7Z9J+J1qwbBm0UL93k/VREDCveKBK6iGjf7KXC6QGshbnpEmeHL0ZkCgmIghsXzpNzPSbBH91BAEQ== +swagger-parser@^8.0.4: + version "8.0.4" + resolved "https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-8.0.4.tgz#ddec68723d13ee3748dd08fd5b7ba579327595da" + integrity sha512-KGRdAaMJogSEB7sPKI31ptKIWX8lydEDAwWgB4pBMU7zys5cd54XNhoPSVlTxG/A3LphjX47EBn9j0dOGyzWbA== dependencies: call-me-maybe "^1.0.1" - json-schema-ref-parser "^7.1.1" - ono "^5.1.0" + json-schema-ref-parser "^7.1.3" + ono "^6.0.0" openapi-schemas "^1.0.2" openapi-types "^1.3.5" swagger-methods "^2.0.1" - z-schema "^4.1.1" + z-schema "^4.2.2" symbol-tree@^3.2.2: version "3.2.4" @@ -4938,12 +5007,9 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.6.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.4.tgz#88cc880c6ed5cf9868fdfa0760654e7bed463f1d" - integrity sha512-9Yc2i881pF4BPGhjteCXQNaXx1DCwm3dtOyBaG2hitHjLWOczw/ki8vD1bqyT3u6K0Ms/FpCShkmfg+FtlOfYA== - dependencies: - commander "~2.20.3" - source-map "~0.6.1" + version "3.11.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.11.1.tgz#32d274fea8aac333293044afd7f81409d5040d38" + integrity sha512-OApPSuJcxcnewwjSGGfWOjx3oix5XpmrK9Z2j0fTRlHGoZ49IU6kExfZTM0++fCArOOCet+vIfWwFHbvWqwp6g== underscore@~1.9.1: version "1.9.1" @@ -5023,10 +5089,10 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validator@^11.0.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-11.1.0.tgz#ac18cac42e0aa5902b603d7a5d9b7827e2346ac4" - integrity sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg== +validator@^12.0.0: + version "12.2.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-12.2.0.tgz#660d47e96267033fd070096c3b1a6f2db4380a0a" + integrity sha512-jJfE/DW6tIK1Ek8nCfNFqt8Wb3nzMoAbocBF6/Icgg1ZFSBpObdnwVY2jQj6qUqzhx5jc71fpvBWyLGO7Xl+nQ== verror@1.10.0: version "1.10.0" @@ -5141,14 +5207,14 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" wrappy@1: version "1.0.2" @@ -5222,10 +5288,10 @@ yallist@^3.0.0, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yargs-parser@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.0.tgz#cdd7a97490ec836195f59f3f4dbe5ea9e8f75f08" - integrity sha512-xLTUnCMc4JhxrPEPUYD5IBR1mWCK/aT6+RJ/K29JY2y1vD+FhtgKK0AXRWvI262q3QSffAQuTouFIKUuHX89wQ== +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" @@ -5262,22 +5328,22 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" -yargs@^14.2.0: - version "14.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.0.tgz#f116a9242c4ed8668790b40759b4906c276e76c3" - integrity sha512-/is78VKbKs70bVZH7w4YaZea6xcJWOAwkhbR0CFuZBmYtfTYF0xjGJF43AYd8g2Uii1yJwmS5GR2vBmrc32sbg== +yargs@^15.0.2: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== dependencies: - cliui "^5.0.0" + cliui "^6.0.0" decamelize "^1.2.0" - find-up "^3.0.0" + find-up "^4.1.0" get-caller-file "^2.0.1" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^3.0.0" + string-width "^4.2.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^15.0.0" + yargs-parser "^18.1.2" yargs@^7.1.0: version "7.1.0" @@ -5298,13 +5364,13 @@ yargs@^7.1.0: y18n "^3.2.1" yargs-parser "^5.0.0" -z-schema@^4.1.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-4.2.1.tgz#3f6f644897eab9f66aad615b6910e4c86a19c8ce" - integrity sha512-UWhAk5QzeIhks51TjHa6d4WexEokzbbwT+Dzq9yOBOx9sNnALo4hpYz9CfJ6IUE2cmzB0vWW3KHePYOfw3L4gQ== +z-schema@^4.2.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-4.2.3.tgz#85f7eea7e6d4fe59a483462a98f511bd78fe9882" + integrity sha512-zkvK/9TC6p38IwcrbnT3ul9in1UX4cm1y/VZSs4GHKIiDCrlafc+YQBgQBUdDXLAoZHf2qvQ7gJJOo6yT1LH6A== dependencies: lodash.get "^4.4.2" lodash.isequal "^4.5.0" - validator "^11.0.0" + validator "^12.0.0" optionalDependencies: commander "^2.7.1" From cf9184d0a697ef46fe7553e2c7e1ebbe463c702f Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 8 Oct 2020 15:05:19 -0400 Subject: [PATCH 5/6] update changelog --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d709e5d3e..0c4850bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,12 @@ ## Pending -- [#205](https://github.com/okta/okta-sdk-nodejs/pull/205) Supports required params validation +- [#205](https://github.com/okta/okta-sdk-nodejs/pull/205) + - Supports required params validation + - Adds models: + - AcsEndpoint + - CustomHotpUserFactor + - CustomHotpUserFactorProfile ## 4.0.0 From 6950b6ba4c96df38a9427b7f1bb589ebb33300a6 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Tue, 13 Oct 2020 10:59:23 -0400 Subject: [PATCH 6/6] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c4850bff..5fa0e5072 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Okta Node SDK Changelog -## Pending +## 4.2.0 - [#205](https://github.com/okta/okta-sdk-nodejs/pull/205) - Supports required params validation