diff --git a/CHANGELOG.md b/CHANGELOG.md index 1be6197ed..d00e85f7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,50 @@ # Okta Node SDK Changelog +## 6.3.0 + +### Features + +- [#299](https://github.com/okta/okta-sdk-nodejs/pull/299/files) Adds Subscription, Application Feature APIs and adds suppport for Org2Org applications. + - new Models/Enum: + - `ApplicationFeature` + - `CapabilitiesCreateObject` + - `CapabilitiesObject` + - `CapabilitiesUpdateObject` + - `ChangeEnum` + - `LifecycleCreateSettingsObject` + - `LifecycleDeactivateSettingsObject` + - `NotificationType` + - `Org2OrgApplication` + - `Org2OrgApplicationSettings` + - `Org2OrgApplicationSettingsApp` + - `PasswordSettingObject` + - `ProfileSettingObject` + - `ProvisioningConnection` + - `ProvisioningConnectionAuthScheme` + - `ProvisioningConnectionProfile` + - `ProvisioningConnectionRequest` + - `ProvisioningConnectionStatus` + - `SeedEnum` + - `Subscription` + - `SubscriptionStatus` + - Client: + - `getDefaultProvisioningConnectionForApplication` + - `setDefaultProvisioningConnectionForApplication` + - `activateDefaultProvisioningConnectionForApplication` + - `deactivateDefaultProvisioningConnectionForApplication` + - `listFeaturesForApplication` + - `getFeatureForApplication` + - `updateFeatureForApplication` + - `updateFeatureForApplication` + - `listRoleSubscriptions` + - `getRoleSubscriptionByNotificationType` + - `subscribeRoleSubscriptionByNotificationType` + - `unsubscribeRoleSubscriptionByNotificationType` + - `listUserSubscriptions` + - `getUserSubscriptionByNotificationType` + - `subscribeUserSubscriptionByNotificationType` + - `unsubscribeUserSubscriptionByNotificationType` + ## 6.2.0 ### Others diff --git a/package.json b/package.json index 4f4b3b41c..4d2b597f6 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "safe-flat": "^2.0.2" }, "devDependencies": { - "@okta/openapi": "^2.9.2", + "@okta/openapi": "^2.10.0", "@types/chai": "^4.2.22", "@types/mocha": "^9.0.0", "@types/node-fetch": "^2.5.8", diff --git a/scripts/unit.sh b/scripts/unit.sh index fa7cd9430..e4fddff62 100644 --- a/scripts/unit.sh +++ b/scripts/unit.sh @@ -12,7 +12,11 @@ export OKTA_CLIENT_PRIVATEKEY=$(cat ${OKTA_HOME}/${REPO}/scripts/privateKey.pem) export TEST_SUITE_TYPE="junit" export TEST_RESULT_FILE_DIR="${REPO}/test-reports" -# Runs unit and jest tests +if ! yarn test:types; then + echo "tsd tests failed! Exiting..." + exit $PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL +fi + if ! yarn test:unit; then echo "Unit tests failed! Exiting..." exit $PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL diff --git a/src/factories/ApplicationFactory.js b/src/factories/ApplicationFactory.js index 2a7a22d6b..9755bdc46 100644 --- a/src/factories/ApplicationFactory.js +++ b/src/factories/ApplicationFactory.js @@ -26,8 +26,8 @@ class ApplicationFactory extends ModelResolutionFactory { 'BOOKMARK': models.BookmarkApplication, 'BROWSER_PLUGIN': new factories.BrowserPluginApplication(), 'OPENID_CONNECT': models.OpenIdConnectApplication, - 'SAML_1_1': models.SamlApplication, - 'SAML_2_0': models.SamlApplication, + 'SAML_1_1': new factories.SamlApplication(), + 'SAML_2_0': new factories.SamlApplication(), 'SECURE_PASSWORD_STORE': models.SecurePasswordStoreApplication, 'WS_FEDERATION': models.WsFederationApplication, }; @@ -36,6 +36,10 @@ class ApplicationFactory extends ModelResolutionFactory { getResolutionProperty() { return 'signOnMode'; } + + getParentModel() { + return models.Application; + } } module.exports = ApplicationFactory; diff --git a/src/factories/BrowserPluginApplicationFactory.js b/src/factories/BrowserPluginApplicationFactory.js index d23fc4973..e87651253 100644 --- a/src/factories/BrowserPluginApplicationFactory.js +++ b/src/factories/BrowserPluginApplicationFactory.js @@ -29,6 +29,10 @@ class BrowserPluginApplicationFactory extends ModelResolutionFactory { getResolutionProperty() { return 'name'; } + + getParentModel() { + return models.BrowserPluginApplication; + } } module.exports = BrowserPluginApplicationFactory; diff --git a/src/factories/PolicyFactory.js b/src/factories/PolicyFactory.js index 4b717f98d..457be71a2 100644 --- a/src/factories/PolicyFactory.js +++ b/src/factories/PolicyFactory.js @@ -33,6 +33,10 @@ class PolicyFactory extends ModelResolutionFactory { getResolutionProperty() { return 'type'; } + + getParentModel() { + return models.Policy; + } } module.exports = PolicyFactory; diff --git a/src/factories/PolicyRuleFactory.js b/src/factories/PolicyRuleFactory.js index eea559e27..3ddcbcda5 100644 --- a/src/factories/PolicyRuleFactory.js +++ b/src/factories/PolicyRuleFactory.js @@ -31,6 +31,10 @@ class PolicyRuleFactory extends ModelResolutionFactory { getResolutionProperty() { return 'type'; } + + getParentModel() { + return models.PolicyRule; + } } module.exports = PolicyRuleFactory; diff --git a/src/factories/SamlApplicationFactory.js b/src/factories/SamlApplicationFactory.js new file mode 100644 index 000000000..7595bc7b6 --- /dev/null +++ b/src/factories/SamlApplicationFactory.js @@ -0,0 +1,37 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +const ModelResolutionFactory = require('../resolution-factory'); +/*eslint-disable no-unused-vars*/ +const factories = require('./'); +const models = require('../models'); + +class SamlApplicationFactory extends ModelResolutionFactory { + getMapping() { + return { + 'okta_org2org': models.Org2OrgApplication, + }; + } + + getResolutionProperty() { + return 'name'; + } + + getParentModel() { + return models.SamlApplication; + } +} + +module.exports = SamlApplicationFactory; diff --git a/src/factories/UserFactorFactory.js b/src/factories/UserFactorFactory.js index 536f66fde..4976d764b 100644 --- a/src/factories/UserFactorFactory.js +++ b/src/factories/UserFactorFactory.js @@ -40,6 +40,10 @@ class UserFactorFactory extends ModelResolutionFactory { getResolutionProperty() { return 'factorType'; } + + getParentModel() { + return models.UserFactor; + } } module.exports = UserFactorFactory; diff --git a/src/factories/index.js b/src/factories/index.js index ac090fd43..152a3d353 100644 --- a/src/factories/index.js +++ b/src/factories/index.js @@ -18,4 +18,5 @@ exports.Application = require('./ApplicationFactory'); exports.BrowserPluginApplication = require('./BrowserPluginApplicationFactory'); exports.Policy = require('./PolicyFactory'); exports.PolicyRule = require('./PolicyRuleFactory'); +exports.SamlApplication = require('./SamlApplicationFactory'); exports.UserFactor = require('./UserFactorFactory'); diff --git a/src/generated-client.js b/src/generated-client.js index d016f2842..b9cce98fd 100644 --- a/src/generated-client.js +++ b/src/generated-client.js @@ -168,6 +168,123 @@ class GeneratedApiClient { return request.then(jsonRes => new factories.Application().createInstance(jsonRes, this)); } + /** + * + * @param appId {String} + * @description + * Get default Provisioning Connection for application + * @returns {Promise} + */ + getDefaultProvisioningConnectionForApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API getDefaultProvisioningConnectionForApplication parameter appId is required.')); + } + let url = `${this.baseUrl}/api/v1/apps/${appId}/connections/default`; + + const resources = [ + `${this.baseUrl}/api/v1/apps/${appId}` + ]; + + const request = this.http.getJson( + url, + null, + { resources } + ); + return request.then(jsonRes => new models.ProvisioningConnection(jsonRes, this)); + } + + /** + * + * @param appId {String} + * @param {ProvisioningConnectionRequest} provisioningConnectionRequest + * @param {Object} queryParams Map of query parameters to add to this request + * @param {String} [queryParams.activate] + * @description + * Set default Provisioning Connection for application + * @returns {Promise} + */ + setDefaultProvisioningConnectionForApplication(appId, provisioningConnectionRequest, queryParameters) { + if (!appId) { + return Promise.reject(new Error('OKTA API setDefaultProvisioningConnectionForApplication parameter appId is required.')); + } + if (!provisioningConnectionRequest) { + return Promise.reject(new Error('OKTA API setDefaultProvisioningConnectionForApplication parameter provisioningConnectionRequest is required.')); + } + let url = `${this.baseUrl}/api/v1/apps/${appId}/connections/default`; + const queryString = qs.stringify(queryParameters || {}); + + url += queryString ? ('?' + queryString) : ''; + + const resources = [ + `${this.baseUrl}/api/v1/apps/${appId}` + ]; + + const request = this.http.postJson( + url, + { + body: provisioningConnectionRequest + }, + { resources } + ); + return request.then(jsonRes => new models.ProvisioningConnection(jsonRes, this)); + } + + /** + * + * @param appId {String} + * @description + * Activates the default Provisioning Connection for an application. + */ + activateDefaultProvisioningConnectionForApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API activateDefaultProvisioningConnectionForApplication parameter appId is required.')); + } + let url = `${this.baseUrl}/api/v1/apps/${appId}/connections/default/lifecycle/activate`; + + const resources = [ + `${this.baseUrl}/api/v1/apps/${appId}` + ]; + + const request = this.http.post( + url, + { + headers: { + 'Content-Type': 'application/json', 'Accept': 'application/json', + }, + }, + { resources } + ); + return request; + } + + /** + * + * @param appId {String} + * @description + * Deactivates the default Provisioning Connection for an application. + */ + deactivateDefaultProvisioningConnectionForApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API deactivateDefaultProvisioningConnectionForApplication parameter appId is required.')); + } + let url = `${this.baseUrl}/api/v1/apps/${appId}/connections/default/lifecycle/deactivate`; + + const resources = [ + `${this.baseUrl}/api/v1/apps/${appId}` + ]; + + const request = this.http.post( + url, + { + headers: { + 'Content-Type': 'application/json', 'Accept': 'application/json', + }, + }, + { resources } + ); + return request; + } + /** * * @param appId {String} @@ -591,6 +708,92 @@ class GeneratedApiClient { return request.then(jsonRes => new models.JsonWebKey(jsonRes, this)); } + /** + * + * @param appId {String} + * @description + * List Features for application + * @returns {Collection} A collection that will yield {@link ApplicationFeature} instances. + */ + listFeaturesForApplication(appId) { + if (!appId) { + return Promise.reject(new Error('OKTA API listFeaturesForApplication parameter appId is required.')); + } + let url = `${this.baseUrl}/api/v1/apps/${appId}/features`; + + return new Collection( + this, + url, + new ModelFactory(models.ApplicationFeature), + ); + } + + /** + * + * @param appId {String} + * @param name {String} + * @description + * Fetches a Feature object for an application. + * @returns {Promise} + */ + getFeatureForApplication(appId, name) { + if (!appId) { + return Promise.reject(new Error('OKTA API getFeatureForApplication parameter appId is required.')); + } + if (!name) { + return Promise.reject(new Error('OKTA API getFeatureForApplication parameter name is required.')); + } + let url = `${this.baseUrl}/api/v1/apps/${appId}/features/${name}`; + + const resources = [ + `${this.baseUrl}/api/v1/apps/${appId}/features/${name}`, + `${this.baseUrl}/api/v1/apps/${appId}` + ]; + + const request = this.http.getJson( + url, + null, + { resources } + ); + return request.then(jsonRes => new models.ApplicationFeature(jsonRes, this)); + } + + /** + * + * @param appId {String} + * @param name {String} + * @param {CapabilitiesObject} capabilitiesObject + * @description + * Updates a Feature object for an application. + * @returns {Promise} + */ + updateFeatureForApplication(appId, name, capabilitiesObject) { + if (!appId) { + return Promise.reject(new Error('OKTA API updateFeatureForApplication parameter appId is required.')); + } + if (!name) { + return Promise.reject(new Error('OKTA API updateFeatureForApplication parameter name is required.')); + } + if (!capabilitiesObject) { + return Promise.reject(new Error('OKTA API updateFeatureForApplication parameter capabilitiesObject is required.')); + } + let url = `${this.baseUrl}/api/v1/apps/${appId}/features/${name}`; + + const resources = [ + `${this.baseUrl}/api/v1/apps/${appId}/features/${name}`, + `${this.baseUrl}/api/v1/apps/${appId}` + ]; + + const request = this.http.putJson( + url, + { + body: capabilitiesObject + }, + { resources } + ); + return request.then(jsonRes => new models.ApplicationFeature(jsonRes, this)); + } + /** * * @param appId {String} @@ -892,6 +1095,36 @@ class GeneratedApiClient { return request; } + /** + * + * @param appId {String} + * @param {file} fs.ReadStream + * @description + * Update the logo for an application. + */ + uploadApplicationLogo(appId, file) { + if (!appId) { + return Promise.reject(new Error('OKTA API uploadApplicationLogo parameter appId is required.')); + } + let url = `${this.baseUrl}/api/v1/apps/${appId}/logo`; + + const resources = [ + `${this.baseUrl}/api/v1/apps/${appId}` + ]; + + const request = this.http.postFormDataFile( + url, + { + headers: { + 'Accept': 'application/json', + }, + }, + file, + { resources } + ); + return request; + } + /** * * @param appId {String} @@ -6410,6 +6643,122 @@ class GeneratedApiClient { return request; } + /** + * + * @param roleTypeOrRoleId {String} + * @description + * When roleType List all subscriptions of a Role. Else when roleId List subscriptions of a Custom Role + * @returns {Collection} A collection that will yield {@link Subscription} instances. + */ + listRoleSubscriptions(roleTypeOrRoleId) { + if (!roleTypeOrRoleId) { + return Promise.reject(new Error('OKTA API listRoleSubscriptions parameter roleTypeOrRoleId is required.')); + } + let url = `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}/subscriptions`; + + return new Collection( + this, + url, + new ModelFactory(models.Subscription), + ); + } + + /** + * + * @param roleTypeOrRoleId {String} + * @param notificationType {String} + * @description + * When roleType Get subscriptions of a Role with a specific notification type. Else when roleId Get subscription of a Custom Role with a specific notification type. + * @returns {Promise} + */ + getRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType) { + if (!roleTypeOrRoleId) { + return Promise.reject(new Error('OKTA API getRoleSubscriptionByNotificationType parameter roleTypeOrRoleId is required.')); + } + if (!notificationType) { + return Promise.reject(new Error('OKTA API getRoleSubscriptionByNotificationType parameter notificationType is required.')); + } + let url = `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}/subscriptions/${notificationType}`; + + const resources = [ + `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}/subscriptions/${notificationType}`, + `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}` + ]; + + const request = this.http.getJson( + url, + null, + { resources } + ); + return request.then(jsonRes => new models.Subscription(jsonRes, this)); + } + + /** + * + * @param roleTypeOrRoleId {String} + * @param notificationType {String} + * @description + * When roleType Subscribes a Role to a specific notification type. When you change the subscription status of a Role, it overrides the subscription of any individual user of that Role. Else when roleId Subscribes a Custom Role to a specific notification type. When you change the subscription status of a Custom Role, it overrides the subscription of any individual user of that Custom Role. + */ + subscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType) { + if (!roleTypeOrRoleId) { + return Promise.reject(new Error('OKTA API subscribeRoleSubscriptionByNotificationType parameter roleTypeOrRoleId is required.')); + } + if (!notificationType) { + return Promise.reject(new Error('OKTA API subscribeRoleSubscriptionByNotificationType parameter notificationType is required.')); + } + let url = `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}/subscriptions/${notificationType}/subscribe`; + + const resources = [ + `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}/subscriptions/${notificationType}`, + `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}` + ]; + + const request = this.http.post( + url, + { + headers: { + 'Content-Type': 'application/json', 'Accept': 'application/json', + }, + }, + { resources } + ); + return request; + } + + /** + * + * @param roleTypeOrRoleId {String} + * @param notificationType {String} + * @description + * When roleType Unsubscribes a Role from a specific notification type. When you change the subscription status of a Role, it overrides the subscription of any individual user of that Role. Else when roleId Unsubscribes a Custom Role from a specific notification type. When you change the subscription status of a Custom Role, it overrides the subscription of any individual user of that Custom Role. + */ + unsubscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType) { + if (!roleTypeOrRoleId) { + return Promise.reject(new Error('OKTA API unsubscribeRoleSubscriptionByNotificationType parameter roleTypeOrRoleId is required.')); + } + if (!notificationType) { + return Promise.reject(new Error('OKTA API unsubscribeRoleSubscriptionByNotificationType parameter notificationType is required.')); + } + let url = `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}/subscriptions/${notificationType}/unsubscribe`; + + const resources = [ + `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}/subscriptions/${notificationType}`, + `${this.baseUrl}/api/v1/roles/${roleTypeOrRoleId}` + ]; + + const request = this.http.post( + url, + { + headers: { + 'Content-Type': 'application/json', 'Accept': 'application/json', + }, + }, + { resources } + ); + return request; + } + /** * * @param {CreateSessionRequest} createSessionRequest @@ -8720,6 +9069,122 @@ class GeneratedApiClient { return request; } + /** + * + * @param userId {String} + * @description + * List subscriptions of a User. Only lists subscriptions for current user. An AccessDeniedException message is sent if requests are made from other users. + * @returns {Collection} A collection that will yield {@link Subscription} instances. + */ + listUserSubscriptions(userId) { + if (!userId) { + return Promise.reject(new Error('OKTA API listUserSubscriptions parameter userId is required.')); + } + let url = `${this.baseUrl}/api/v1/users/${userId}/subscriptions`; + + return new Collection( + this, + url, + new ModelFactory(models.Subscription), + ); + } + + /** + * + * @param userId {String} + * @param notificationType {String} + * @description + * Get the subscriptions of a User with a specific notification type. Only gets subscriptions for current user. An AccessDeniedException message is sent if requests are made from other users. + * @returns {Promise} + */ + getUserSubscriptionByNotificationType(userId, notificationType) { + if (!userId) { + return Promise.reject(new Error('OKTA API getUserSubscriptionByNotificationType parameter userId is required.')); + } + if (!notificationType) { + return Promise.reject(new Error('OKTA API getUserSubscriptionByNotificationType parameter notificationType is required.')); + } + let url = `${this.baseUrl}/api/v1/users/${userId}/subscriptions/${notificationType}`; + + const resources = [ + `${this.baseUrl}/api/v1/users/${userId}/subscriptions/${notificationType}`, + `${this.baseUrl}/api/v1/users/${userId}` + ]; + + const request = this.http.getJson( + url, + null, + { resources } + ); + return request.then(jsonRes => new models.Subscription(jsonRes, this)); + } + + /** + * + * @param userId {String} + * @param notificationType {String} + * @description + * Subscribes a User to a specific notification type. Only the current User can subscribe to a specific notification type. An AccessDeniedException message is sent if requests are made from other users. + */ + subscribeUserSubscriptionByNotificationType(userId, notificationType) { + if (!userId) { + return Promise.reject(new Error('OKTA API subscribeUserSubscriptionByNotificationType parameter userId is required.')); + } + if (!notificationType) { + return Promise.reject(new Error('OKTA API subscribeUserSubscriptionByNotificationType parameter notificationType is required.')); + } + let url = `${this.baseUrl}/api/v1/users/${userId}/subscriptions/${notificationType}/subscribe`; + + const resources = [ + `${this.baseUrl}/api/v1/users/${userId}/subscriptions/${notificationType}`, + `${this.baseUrl}/api/v1/users/${userId}` + ]; + + const request = this.http.post( + url, + { + headers: { + 'Content-Type': 'application/json', 'Accept': 'application/json', + }, + }, + { resources } + ); + return request; + } + + /** + * + * @param userId {String} + * @param notificationType {String} + * @description + * Unsubscribes a User from a specific notification type. Only the current User can unsubscribe from a specific notification type. An AccessDeniedException message is sent if requests are made from other users. + */ + unsubscribeUserSubscriptionByNotificationType(userId, notificationType) { + if (!userId) { + return Promise.reject(new Error('OKTA API unsubscribeUserSubscriptionByNotificationType parameter userId is required.')); + } + if (!notificationType) { + return Promise.reject(new Error('OKTA API unsubscribeUserSubscriptionByNotificationType parameter notificationType is required.')); + } + let url = `${this.baseUrl}/api/v1/users/${userId}/subscriptions/${notificationType}/unsubscribe`; + + const resources = [ + `${this.baseUrl}/api/v1/users/${userId}/subscriptions/${notificationType}`, + `${this.baseUrl}/api/v1/users/${userId}` + ]; + + const request = this.http.post( + url, + { + headers: { + 'Content-Type': 'application/json', 'Accept': 'application/json', + }, + }, + { resources } + ); + return request; + } + /** * * @param {Object} queryParams Map of query parameters to add to this request diff --git a/src/models/Application.js b/src/models/Application.js index 2ec57b154..ddb2d0e98 100644 --- a/src/models/Application.js +++ b/src/models/Application.js @@ -295,6 +295,31 @@ class Application extends Resource { getScopeConsentGrant(grantId, queryParameters) { return this.httpClient.getScopeConsentGrant(this.id, grantId, queryParameters); } + + /** + * @param {string} appId + * @param {file} fs.ReadStream + */ + uploadApplicationLogo(appId, file) { + return this.httpClient.uploadApplicationLogo(appId, file); + } + + /** + * @param {string} name + * @returns {Promise} + */ + getFeatureForApplication(name) { + return this.httpClient.getFeatureForApplication(this.id, name); + } + + /** + * @param {string} name + * @param {CapabilitiesObject} capabilitiesObject + * @returns {Promise} + */ + updateFeatureForApplication(name, capabilitiesObject) { + return this.httpClient.updateFeatureForApplication(this.id, name, capabilitiesObject); + } } module.exports = Application; diff --git a/src/models/ApplicationFeature.js b/src/models/ApplicationFeature.js new file mode 100644 index 000000000..56d82bd8b --- /dev/null +++ b/src/models/ApplicationFeature.js @@ -0,0 +1,46 @@ +/*! + * Copyright (c) 2017-present, 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'); +const CapabilitiesObject = require('./CapabilitiesObject'); + +/** + * @class ApplicationFeature + * @extends Resource + * @property { hash } _links + * @property { CapabilitiesObject } capabilities + * @property { string } description + * @property { string } name + * @property { EnabledStatus } status + */ +class ApplicationFeature extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + if (resourceJson && resourceJson.capabilities) { + this.capabilities = new CapabilitiesObject(resourceJson.capabilities); + } + } + + + /** + * @param {string} appId + * @returns {Collection} A collection that will yield {@link ApplicationFeature} instances. + */ + listFeaturesForApplication(appId) { + return this.httpClient.listFeaturesForApplication(appId); + } +} + +module.exports = ApplicationFeature; diff --git a/src/models/CapabilitiesCreateObject.js b/src/models/CapabilitiesCreateObject.js new file mode 100644 index 000000000..9273bb718 --- /dev/null +++ b/src/models/CapabilitiesCreateObject.js @@ -0,0 +1,34 @@ +/*! + * Copyright (c) 2017-present, 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'); +const LifecycleCreateSettingObject = require('./LifecycleCreateSettingObject'); + +/** + * @class CapabilitiesCreateObject + * @extends Resource + * @property { LifecycleCreateSettingObject } lifecycleCreate + */ +class CapabilitiesCreateObject extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + if (resourceJson && resourceJson.lifecycleCreate) { + this.lifecycleCreate = new LifecycleCreateSettingObject(resourceJson.lifecycleCreate); + } + } + +} + +module.exports = CapabilitiesCreateObject; diff --git a/src/models/CapabilitiesObject.js b/src/models/CapabilitiesObject.js new file mode 100644 index 000000000..c0b8419fe --- /dev/null +++ b/src/models/CapabilitiesObject.js @@ -0,0 +1,39 @@ +/*! + * Copyright (c) 2017-present, 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'); +const CapabilitiesCreateObject = require('./CapabilitiesCreateObject'); +const CapabilitiesUpdateObject = require('./CapabilitiesUpdateObject'); + +/** + * @class CapabilitiesObject + * @extends Resource + * @property { CapabilitiesCreateObject } create + * @property { CapabilitiesUpdateObject } update + */ +class CapabilitiesObject extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + if (resourceJson && resourceJson.create) { + this.create = new CapabilitiesCreateObject(resourceJson.create); + } + if (resourceJson && resourceJson.update) { + this.update = new CapabilitiesUpdateObject(resourceJson.update); + } + } + +} + +module.exports = CapabilitiesObject; diff --git a/src/models/CapabilitiesUpdateObject.js b/src/models/CapabilitiesUpdateObject.js new file mode 100644 index 000000000..c8adc37bb --- /dev/null +++ b/src/models/CapabilitiesUpdateObject.js @@ -0,0 +1,44 @@ +/*! + * Copyright (c) 2017-present, 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'); +const LifecycleDeactivateSettingObject = require('./LifecycleDeactivateSettingObject'); +const PasswordSettingObject = require('./PasswordSettingObject'); +const ProfileSettingObject = require('./ProfileSettingObject'); + +/** + * @class CapabilitiesUpdateObject + * @extends Resource + * @property { LifecycleDeactivateSettingObject } lifecycleDeactivate + * @property { PasswordSettingObject } password + * @property { ProfileSettingObject } profile + */ +class CapabilitiesUpdateObject extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + if (resourceJson && resourceJson.lifecycleDeactivate) { + this.lifecycleDeactivate = new LifecycleDeactivateSettingObject(resourceJson.lifecycleDeactivate); + } + if (resourceJson && resourceJson.password) { + this.password = new PasswordSettingObject(resourceJson.password); + } + if (resourceJson && resourceJson.profile) { + this.profile = new ProfileSettingObject(resourceJson.profile); + } + } + +} + +module.exports = CapabilitiesUpdateObject; diff --git a/src/models/ChangeEnum.js b/src/models/ChangeEnum.js new file mode 100644 index 000000000..0f3e4a5d0 --- /dev/null +++ b/src/models/ChangeEnum.js @@ -0,0 +1,22 @@ +/*! + * Copyright (c) 2017-present, 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 ChangeEnum; +(function (ChangeEnum) { + ChangeEnum['KEEP_EXISTING'] = 'KEEP_EXISTING'; + ChangeEnum['CHANGE'] = 'CHANGE'; +}(ChangeEnum || (ChangeEnum = {}))); + +module.exports = ChangeEnum; diff --git a/src/models/LifecycleCreateSettingObject.js b/src/models/LifecycleCreateSettingObject.js new file mode 100644 index 000000000..46d97f76b --- /dev/null +++ b/src/models/LifecycleCreateSettingObject.js @@ -0,0 +1,32 @@ +/*! + * Copyright (c) 2017-present, 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 LifecycleCreateSettingObject + * @extends Resource + * @property { EnabledStatus } status + */ +class LifecycleCreateSettingObject extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + +} + +module.exports = LifecycleCreateSettingObject; diff --git a/src/models/LifecycleDeactivateSettingObject.js b/src/models/LifecycleDeactivateSettingObject.js new file mode 100644 index 000000000..d65441e7d --- /dev/null +++ b/src/models/LifecycleDeactivateSettingObject.js @@ -0,0 +1,32 @@ +/*! + * Copyright (c) 2017-present, 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 LifecycleDeactivateSettingObject + * @extends Resource + * @property { EnabledStatus } status + */ +class LifecycleDeactivateSettingObject extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + +} + +module.exports = LifecycleDeactivateSettingObject; diff --git a/src/models/NotificationType.js b/src/models/NotificationType.js new file mode 100644 index 000000000..312ab4f1f --- /dev/null +++ b/src/models/NotificationType.js @@ -0,0 +1,32 @@ +/*! + * Copyright (c) 2017-present, 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 NotificationType; +(function (NotificationType) { + NotificationType['CONNECTOR_AGENT'] = 'CONNECTOR_AGENT'; + NotificationType['USER_LOCKED_OUT'] = 'USER_LOCKED_OUT'; + NotificationType['APP_IMPORT'] = 'APP_IMPORT'; + NotificationType['LDAP_AGENT'] = 'LDAP_AGENT'; + NotificationType['AD_AGENT'] = 'AD_AGENT'; + NotificationType['OKTA_ANNOUNCEMENT'] = 'OKTA_ANNOUNCEMENT'; + NotificationType['OKTA_ISSUE'] = 'OKTA_ISSUE'; + NotificationType['OKTA_UPDATE'] = 'OKTA_UPDATE'; + NotificationType['IWA_AGENT'] = 'IWA_AGENT'; + NotificationType['USER_DEPROVISION'] = 'USER_DEPROVISION'; + NotificationType['REPORT_SUSPICIOUS_ACTIVITY'] = 'REPORT_SUSPICIOUS_ACTIVITY'; + NotificationType['RATELIMIT_NOTIFICATION'] = 'RATELIMIT_NOTIFICATION'; +}(NotificationType || (NotificationType = {}))); + +module.exports = NotificationType; diff --git a/src/models/Org2OrgApplication.js b/src/models/Org2OrgApplication.js new file mode 100644 index 000000000..dacfcb8ff --- /dev/null +++ b/src/models/Org2OrgApplication.js @@ -0,0 +1,35 @@ +/*! + * Copyright (c) 2017-present, 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 SamlApplication = require('./SamlApplication'); +const Org2OrgApplicationSettings = require('./Org2OrgApplicationSettings'); + +/** + * @class Org2OrgApplication + * @extends SamlApplication + * @property { object } name + * @property { Org2OrgApplicationSettings } settings + */ +class Org2OrgApplication extends SamlApplication { + constructor(resourceJson, client) { + super(resourceJson, client); + if (resourceJson && resourceJson.settings) { + this.settings = new Org2OrgApplicationSettings(resourceJson.settings); + } + } + +} + +module.exports = Org2OrgApplication; diff --git a/src/models/Org2OrgApplicationSettings.js b/src/models/Org2OrgApplicationSettings.js new file mode 100644 index 000000000..05f9a3a7f --- /dev/null +++ b/src/models/Org2OrgApplicationSettings.js @@ -0,0 +1,34 @@ +/*! + * Copyright (c) 2017-present, 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 SamlApplicationSettings = require('./SamlApplicationSettings'); +const Org2OrgApplicationSettingsApp = require('./Org2OrgApplicationSettingsApp'); + +/** + * @class Org2OrgApplicationSettings + * @extends SamlApplicationSettings + * @property { Org2OrgApplicationSettingsApp } app + */ +class Org2OrgApplicationSettings extends SamlApplicationSettings { + constructor(resourceJson, client) { + super(resourceJson, client); + if (resourceJson && resourceJson.app) { + this.app = new Org2OrgApplicationSettingsApp(resourceJson.app); + } + } + +} + +module.exports = Org2OrgApplicationSettings; diff --git a/src/models/Org2OrgApplicationSettingsApp.js b/src/models/Org2OrgApplicationSettingsApp.js new file mode 100644 index 000000000..76c0dcd08 --- /dev/null +++ b/src/models/Org2OrgApplicationSettingsApp.js @@ -0,0 +1,34 @@ +/*! + * Copyright (c) 2017-present, 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 ApplicationSettingsApplication = require('./ApplicationSettingsApplication'); + + +/** + * @class Org2OrgApplicationSettingsApp + * @extends ApplicationSettingsApplication + * @property { string } acsUrl + * @property { string } audRestriction + * @property { string } baseUrl + */ +class Org2OrgApplicationSettingsApp extends ApplicationSettingsApplication { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + +} + +module.exports = Org2OrgApplicationSettingsApp; diff --git a/src/models/PasswordSettingObject.js b/src/models/PasswordSettingObject.js new file mode 100644 index 000000000..05e8b06cb --- /dev/null +++ b/src/models/PasswordSettingObject.js @@ -0,0 +1,34 @@ +/*! + * Copyright (c) 2017-present, 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 PasswordSettingObject + * @extends Resource + * @property { ChangeEnum } change + * @property { SeedEnum } seed + * @property { EnabledStatus } status + */ +class PasswordSettingObject extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + +} + +module.exports = PasswordSettingObject; diff --git a/src/models/ProfileSettingObject.js b/src/models/ProfileSettingObject.js new file mode 100644 index 000000000..49e095073 --- /dev/null +++ b/src/models/ProfileSettingObject.js @@ -0,0 +1,32 @@ +/*! + * Copyright (c) 2017-present, 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 ProfileSettingObject + * @extends Resource + * @property { EnabledStatus } status + */ +class ProfileSettingObject extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + +} + +module.exports = ProfileSettingObject; diff --git a/src/models/ProvisioningConnection.js b/src/models/ProvisioningConnection.js new file mode 100644 index 000000000..eb864e2c8 --- /dev/null +++ b/src/models/ProvisioningConnection.js @@ -0,0 +1,56 @@ +/*! + * Copyright (c) 2017-present, 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 ProvisioningConnection + * @extends Resource + * @property { hash } _links + * @property { ProvisioningConnectionAuthScheme } authScheme + * @property { ProvisioningConnectionStatus } status + */ +class ProvisioningConnection extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + + + /** + * @param {string} appId + * @returns {Promise} + */ + getDefaultProvisioningConnectionForApplication(appId) { + return this.httpClient.getDefaultProvisioningConnectionForApplication(appId); + } + + /** + * @param {string} appId + */ + activateDefaultProvisioningConnectionForApplication(appId) { + return this.httpClient.activateDefaultProvisioningConnectionForApplication(appId); + } + + /** + * @param {string} appId + */ + deactivateDefaultProvisioningConnectionForApplication(appId) { + return this.httpClient.deactivateDefaultProvisioningConnectionForApplication(appId); + } +} + +module.exports = ProvisioningConnection; diff --git a/src/models/ProvisioningConnectionAuthScheme.js b/src/models/ProvisioningConnectionAuthScheme.js new file mode 100644 index 000000000..f6cf63986 --- /dev/null +++ b/src/models/ProvisioningConnectionAuthScheme.js @@ -0,0 +1,22 @@ +/*! + * Copyright (c) 2017-present, 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 ProvisioningConnectionAuthScheme; +(function (ProvisioningConnectionAuthScheme) { + ProvisioningConnectionAuthScheme['TOKEN'] = 'TOKEN'; + ProvisioningConnectionAuthScheme['UNKNOWN'] = 'UNKNOWN'; +}(ProvisioningConnectionAuthScheme || (ProvisioningConnectionAuthScheme = {}))); + +module.exports = ProvisioningConnectionAuthScheme; diff --git a/src/models/ProvisioningConnectionProfile.js b/src/models/ProvisioningConnectionProfile.js new file mode 100644 index 000000000..052778d8f --- /dev/null +++ b/src/models/ProvisioningConnectionProfile.js @@ -0,0 +1,43 @@ +/*! + * Copyright (c) 2017-present, 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 ProvisioningConnectionProfile + * @extends Resource + * @property { ProvisioningConnectionAuthScheme } authScheme + * @property { string } token + */ +class ProvisioningConnectionProfile extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + + + /** + * @param {string} appId + * @param {ProvisioningConnectionRequest} provisioningConnectionRequest + * @param {object} queryParameters + * @returns {Promise} + */ + setDefaultProvisioningConnectionForApplication(appId, provisioningConnectionRequest, queryParameters) { + return this.httpClient.setDefaultProvisioningConnectionForApplication(appId, provisioningConnectionRequest, queryParameters); + } +} + +module.exports = ProvisioningConnectionProfile; diff --git a/src/models/ProvisioningConnectionRequest.js b/src/models/ProvisioningConnectionRequest.js new file mode 100644 index 000000000..6185b1f89 --- /dev/null +++ b/src/models/ProvisioningConnectionRequest.js @@ -0,0 +1,34 @@ +/*! + * Copyright (c) 2017-present, 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'); +const ProvisioningConnectionProfile = require('./ProvisioningConnectionProfile'); + +/** + * @class ProvisioningConnectionRequest + * @extends Resource + * @property { ProvisioningConnectionProfile } profile + */ +class ProvisioningConnectionRequest extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + if (resourceJson && resourceJson.profile) { + this.profile = new ProvisioningConnectionProfile(resourceJson.profile); + } + } + +} + +module.exports = ProvisioningConnectionRequest; diff --git a/src/models/ProvisioningConnectionStatus.js b/src/models/ProvisioningConnectionStatus.js new file mode 100644 index 000000000..02c379eb2 --- /dev/null +++ b/src/models/ProvisioningConnectionStatus.js @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2017-present, 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 ProvisioningConnectionStatus; +(function (ProvisioningConnectionStatus) { + ProvisioningConnectionStatus['DISABLED'] = 'DISABLED'; + ProvisioningConnectionStatus['ENABLED'] = 'ENABLED'; + ProvisioningConnectionStatus['UNKNOWN'] = 'UNKNOWN'; +}(ProvisioningConnectionStatus || (ProvisioningConnectionStatus = {}))); + +module.exports = ProvisioningConnectionStatus; diff --git a/src/models/SeedEnum.js b/src/models/SeedEnum.js new file mode 100644 index 000000000..7497cdf7c --- /dev/null +++ b/src/models/SeedEnum.js @@ -0,0 +1,22 @@ +/*! + * Copyright (c) 2017-present, 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 SeedEnum; +(function (SeedEnum) { + SeedEnum['OKTA'] = 'OKTA'; + SeedEnum['RANDOM'] = 'RANDOM'; +}(SeedEnum || (SeedEnum = {}))); + +module.exports = SeedEnum; diff --git a/src/models/Subscription.js b/src/models/Subscription.js new file mode 100644 index 000000000..c50c0cfa5 --- /dev/null +++ b/src/models/Subscription.js @@ -0,0 +1,101 @@ +/*! + * Copyright (c) 2017-present, 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 Subscription + * @extends Resource + * @property { hash } _links + * @property { array } channels + * @property { NotificationType } notificationType + * @property { SubscriptionStatus } status + */ +class Subscription extends Resource { + constructor(resourceJson, client) { + super(resourceJson, client); + + } + + + /** + * @param {string} roleTypeOrRoleId + * @returns {Collection} A collection that will yield {@link Subscription} instances. + */ + listRoleSubscriptions(roleTypeOrRoleId) { + return this.httpClient.listRoleSubscriptions(roleTypeOrRoleId); + } + + /** + * @param {string} roleTypeOrRoleId + * @param {string} notificationType + * @returns {Promise} + */ + getRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType) { + return this.httpClient.getRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType); + } + + /** + * @param {string} userId + * @param {string} notificationType + * @returns {Promise} + */ + getUserSubscriptionByNotificationType(userId, notificationType) { + return this.httpClient.getUserSubscriptionByNotificationType(userId, notificationType); + } + + /** + * @param {string} userId + * @returns {Collection} A collection that will yield {@link Subscription} instances. + */ + listUserSubscriptions(userId) { + return this.httpClient.listUserSubscriptions(userId); + } + + /** + * @param {string} userId + * @param {string} notificationType + */ + subscribeUserSubscriptionByNotificationType(userId, notificationType) { + return this.httpClient.subscribeUserSubscriptionByNotificationType(userId, notificationType); + } + + /** + * @param {string} roleTypeOrRoleId + * @param {string} notificationType + */ + unsubscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType) { + return this.httpClient.unsubscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType); + } + + /** + * @param {string} roleTypeOrRoleId + * @param {string} notificationType + */ + subscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType) { + return this.httpClient.subscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId, notificationType); + } + + /** + * @param {string} userId + * @param {string} notificationType + */ + unsubscribeUserSubscriptionByNotificationType(userId, notificationType) { + return this.httpClient.unsubscribeUserSubscriptionByNotificationType(userId, notificationType); + } +} + +module.exports = Subscription; diff --git a/src/models/SubscriptionStatus.js b/src/models/SubscriptionStatus.js new file mode 100644 index 000000000..d10162dc0 --- /dev/null +++ b/src/models/SubscriptionStatus.js @@ -0,0 +1,22 @@ +/*! + * Copyright (c) 2017-present, 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 SubscriptionStatus; +(function (SubscriptionStatus) { + SubscriptionStatus['SUBSCRIBED'] = 'subscribed'; + SubscriptionStatus['UNSUBSCRIBED'] = 'unsubscribed'; +}(SubscriptionStatus || (SubscriptionStatus = {}))); + +module.exports = SubscriptionStatus; diff --git a/src/models/index.js b/src/models/index.js index 935fe3110..14a97d15f 100644 --- a/src/models/index.js +++ b/src/models/index.js @@ -41,6 +41,7 @@ exports.ApplicationCredentialsScheme = require('./ApplicationCredentialsScheme') exports.ApplicationCredentialsSigning = require('./ApplicationCredentialsSigning'); exports.ApplicationCredentialsSigningUse = require('./ApplicationCredentialsSigningUse'); exports.ApplicationCredentialsUsernameTemplate = require('./ApplicationCredentialsUsernameTemplate'); +exports.ApplicationFeature = require('./ApplicationFeature'); exports.ApplicationGroupAssignment = require('./ApplicationGroupAssignment'); exports.ApplicationLicensing = require('./ApplicationLicensing'); exports.ApplicationSettings = require('./ApplicationSettings'); @@ -85,8 +86,12 @@ exports.Brand = require('./Brand'); exports.BrowserPluginApplication = require('./BrowserPluginApplication'); exports.CallUserFactor = require('./CallUserFactor'); exports.CallUserFactorProfile = require('./CallUserFactorProfile'); +exports.CapabilitiesCreateObject = require('./CapabilitiesCreateObject'); +exports.CapabilitiesObject = require('./CapabilitiesObject'); +exports.CapabilitiesUpdateObject = require('./CapabilitiesUpdateObject'); exports.CatalogApplication = require('./CatalogApplication'); exports.CatalogApplicationStatus = require('./CatalogApplicationStatus'); +exports.ChangeEnum = require('./ChangeEnum'); exports.ChangePasswordRequest = require('./ChangePasswordRequest'); exports.ChannelBinding = require('./ChannelBinding'); exports.ClientPolicyCondition = require('./ClientPolicyCondition'); @@ -186,6 +191,8 @@ exports.IonForm = require('./IonForm'); exports.JsonWebKey = require('./JsonWebKey'); exports.JwkUse = require('./JwkUse'); exports.KnowledgeConstraint = require('./KnowledgeConstraint'); +exports.LifecycleCreateSettingObject = require('./LifecycleCreateSettingObject'); +exports.LifecycleDeactivateSettingObject = require('./LifecycleDeactivateSettingObject'); exports.LifecycleExpirationPolicyRuleCondition = require('./LifecycleExpirationPolicyRuleCondition'); exports.LinkedObject = require('./LinkedObject'); exports.LinkedObjectDetails = require('./LinkedObjectDetails'); @@ -217,6 +224,7 @@ exports.NetworkZoneLocation = require('./NetworkZoneLocation'); exports.NetworkZoneStatus = require('./NetworkZoneStatus'); exports.NetworkZoneType = require('./NetworkZoneType'); exports.NetworkZoneUsage = require('./NetworkZoneUsage'); +exports.NotificationType = require('./NotificationType'); exports.OAuth2Actor = require('./OAuth2Actor'); exports.OAuth2Claim = require('./OAuth2Claim'); exports.OAuth2ClaimConditions = require('./OAuth2ClaimConditions'); @@ -250,6 +258,9 @@ exports.OpenIdConnectApplicationSettingsClientKeys = require('./OpenIdConnectApp exports.OpenIdConnectApplicationSettingsRefreshToken = require('./OpenIdConnectApplicationSettingsRefreshToken'); exports.OpenIdConnectApplicationType = require('./OpenIdConnectApplicationType'); exports.OpenIdConnectRefreshTokenRotationType = require('./OpenIdConnectRefreshTokenRotationType'); +exports.Org2OrgApplication = require('./Org2OrgApplication'); +exports.Org2OrgApplicationSettings = require('./Org2OrgApplicationSettings'); +exports.Org2OrgApplicationSettingsApp = require('./Org2OrgApplicationSettingsApp'); exports.OrgContactType = require('./OrgContactType'); exports.OrgContactTypeObj = require('./OrgContactTypeObj'); exports.OrgContactUser = require('./OrgContactUser'); @@ -288,6 +299,7 @@ exports.PasswordPolicyRuleAction = require('./PasswordPolicyRuleAction'); exports.PasswordPolicyRuleActions = require('./PasswordPolicyRuleActions'); exports.PasswordPolicyRuleConditions = require('./PasswordPolicyRuleConditions'); exports.PasswordPolicySettings = require('./PasswordPolicySettings'); +exports.PasswordSettingObject = require('./PasswordSettingObject'); exports.PlatformConditionEvaluatorPlatform = require('./PlatformConditionEvaluatorPlatform'); exports.PlatformConditionEvaluatorPlatformOperatingSystem = require('./PlatformConditionEvaluatorPlatformOperatingSystem'); exports.PlatformConditionEvaluatorPlatformOperatingSystemVersion = require('./PlatformConditionEvaluatorPlatformOperatingSystemVersion'); @@ -320,6 +332,7 @@ exports.ProfileMapping = require('./ProfileMapping'); exports.ProfileMappingProperty = require('./ProfileMappingProperty'); exports.ProfileMappingPropertyPushStatus = require('./ProfileMappingPropertyPushStatus'); exports.ProfileMappingSource = require('./ProfileMappingSource'); +exports.ProfileSettingObject = require('./ProfileSettingObject'); exports.Protocol = require('./Protocol'); exports.ProtocolAlgorithmType = require('./ProtocolAlgorithmType'); exports.ProtocolAlgorithmTypeSignature = require('./ProtocolAlgorithmTypeSignature'); @@ -331,6 +344,11 @@ exports.ProtocolRelayStateFormat = require('./ProtocolRelayStateFormat'); exports.ProtocolSettings = require('./ProtocolSettings'); exports.Provisioning = require('./Provisioning'); exports.ProvisioningConditions = require('./ProvisioningConditions'); +exports.ProvisioningConnection = require('./ProvisioningConnection'); +exports.ProvisioningConnectionAuthScheme = require('./ProvisioningConnectionAuthScheme'); +exports.ProvisioningConnectionProfile = require('./ProvisioningConnectionProfile'); +exports.ProvisioningConnectionRequest = require('./ProvisioningConnectionRequest'); +exports.ProvisioningConnectionStatus = require('./ProvisioningConnectionStatus'); exports.ProvisioningDeprovisionedCondition = require('./ProvisioningDeprovisionedCondition'); exports.ProvisioningGroups = require('./ProvisioningGroups'); exports.ProvisioningSuspendedCondition = require('./ProvisioningSuspendedCondition'); @@ -360,6 +378,7 @@ exports.SecurePasswordStoreApplicationSettingsApplication = require('./SecurePas exports.SecurityQuestion = require('./SecurityQuestion'); exports.SecurityQuestionUserFactor = require('./SecurityQuestionUserFactor'); exports.SecurityQuestionUserFactorProfile = require('./SecurityQuestionUserFactorProfile'); +exports.SeedEnum = require('./SeedEnum'); exports.Session = require('./Session'); exports.SessionAuthenticationMethod = require('./SessionAuthenticationMethod'); exports.SessionIdentityProvider = require('./SessionIdentityProvider'); @@ -375,6 +394,8 @@ exports.SmsUserFactor = require('./SmsUserFactor'); exports.SmsUserFactorProfile = require('./SmsUserFactorProfile'); exports.SocialAuthToken = require('./SocialAuthToken'); exports.SpCertificate = require('./SpCertificate'); +exports.Subscription = require('./Subscription'); +exports.SubscriptionStatus = require('./SubscriptionStatus'); exports.SwaApplication = require('./SwaApplication'); exports.SwaApplicationSettings = require('./SwaApplicationSettings'); exports.SwaApplicationSettingsApplication = require('./SwaApplicationSettingsApplication'); diff --git a/src/resolution-factory.js b/src/resolution-factory.js index 0f506fdb6..edd18b891 100644 --- a/src/resolution-factory.js +++ b/src/resolution-factory.js @@ -10,8 +10,6 @@ * See the License for the specific language governing permissions and limitations under the License. */ -const Resource = require('./resource'); - class ModelResolutionFactory { getMapping() { @@ -22,17 +20,23 @@ class ModelResolutionFactory { return ''; } + getParentModel() { + return null; + } + createInstance(resource, client) { const resolutionProperty = this.getResolutionProperty(); const mapping = this.getMapping(); + let Constructor = this.getParentModel(); if (resolutionProperty && resource[resolutionProperty] && mapping[resource[resolutionProperty]]) { - const Constructor = mapping[resource[resolutionProperty]]; + Constructor = mapping[resource[resolutionProperty]]; if (Constructor instanceof ModelResolutionFactory) { return Constructor.createInstance.apply(Constructor, arguments); } return new Constructor(resource, client); } - return new Resource(resource, client); + + return new Constructor(resource, client); } } diff --git a/src/types/generated-client.d.ts b/src/types/generated-client.d.ts index c0f596c28..6b0888f1c 100644 --- a/src/types/generated-client.d.ts +++ b/src/types/generated-client.d.ts @@ -17,13 +17,18 @@ import { ApplicationOptions } from './parameterized-operations-client'; import { Collection } from './collection'; import { Application } from './models/Application'; import { Response } from 'node-fetch'; +import { ProvisioningConnection } from './models/ProvisioningConnection'; +import { ProvisioningConnectionRequestOptions } from './models/ProvisioningConnectionRequest'; import { Csr } from './models/Csr'; import { CsrMetadataOptions } from './models/CsrMetadata'; import { JsonWebKey } from './models/JsonWebKey'; +import { ApplicationFeature } from './models/ApplicationFeature'; +import { CapabilitiesObjectOptions } from './models/CapabilitiesObject'; import { OAuth2ScopeConsentGrant } from './models/OAuth2ScopeConsentGrant'; import { OAuth2ScopeConsentGrantOptions } from './models/OAuth2ScopeConsentGrant'; import { ApplicationGroupAssignment } from './models/ApplicationGroupAssignment'; import { ApplicationGroupAssignmentOptions } from './models/ApplicationGroupAssignment'; +import { ReadStream } from 'fs'; import { OAuth2Token } from './models/OAuth2Token'; import { AppUser } from './models/AppUser'; import { AppUserOptions } from './models/AppUser'; @@ -46,7 +51,6 @@ import { Brand } from './models/Brand'; import { BrandOptions } from './models/Brand'; import { ThemeResponse } from './models/ThemeResponse'; import { ThemeOptions } from './models/Theme'; -import { ReadStream } from 'fs'; import { ImageUploadResponse } from './models/ImageUploadResponse'; import { DomainListResponse } from './models/DomainListResponse'; import { DomainOptions } from './models/Domain'; @@ -96,6 +100,7 @@ import { Policy } from './models/Policy'; import { PolicyOptions } from './models/Policy'; import { PolicyRule } from './models/PolicyRule'; import { PolicyRuleOptions } from './models/PolicyRule'; +import { Subscription } from './models/Subscription'; import { CreateSessionRequestOptions } from './models/CreateSessionRequest'; import { Session } from './models/Session'; import { SmsTemplate } from './models/SmsTemplate'; @@ -141,6 +146,12 @@ export declare class GeneratedApiClient { expand?: string, }): Promise; updateApplication(appId: string, application: ApplicationOptions): Promise; + getDefaultProvisioningConnectionForApplication(appId: string): Promise; + setDefaultProvisioningConnectionForApplication(appId: string, provisioningConnectionRequest: ProvisioningConnectionRequestOptions, queryParameters?: { + activate?: boolean, + }): Promise; + activateDefaultProvisioningConnectionForApplication(appId: string): Promise; + deactivateDefaultProvisioningConnectionForApplication(appId: string): Promise; listCsrsForApplication(appId: string): Collection; generateCsrForApplication(appId: string, csrMetadata: CsrMetadataOptions): Promise; revokeCsrFromApplication(appId: string, csrId: string): Promise; @@ -158,6 +169,9 @@ export declare class GeneratedApiClient { cloneApplicationKey(appId: string, keyId: string, queryParameters: { targetAid: string, }): Promise; + listFeaturesForApplication(appId: string): Collection; + getFeatureForApplication(appId: string, name: string): Promise; + updateFeatureForApplication(appId: string, name: string, capabilitiesObject: CapabilitiesObjectOptions): Promise; listScopeConsentGrants(appId: string, queryParameters?: { expand?: string, }): Collection; @@ -179,6 +193,7 @@ export declare class GeneratedApiClient { createApplicationGroupAssignment(appId: string, groupId: string, applicationGroupAssignment?: ApplicationGroupAssignmentOptions): Promise; activateApplication(appId: string): Promise; deactivateApplication(appId: string): Promise; + uploadApplicationLogo(appId: string, file: ReadStream): Promise; revokeOAuth2TokensForApplication(appId: string): Promise; listOAuth2TokensForApplication(appId: string, queryParameters?: { expand?: string, @@ -478,6 +493,10 @@ export declare class GeneratedApiClient { updatePolicyRule(policyId: string, ruleId: string, policyRule: PolicyRuleOptions): Promise; activatePolicyRule(policyId: string, ruleId: string): Promise; deactivatePolicyRule(policyId: string, ruleId: string): Promise; + listRoleSubscriptions(roleTypeOrRoleId: string): Collection; + getRoleSubscriptionByNotificationType(roleTypeOrRoleId: string, notificationType: string): Promise; + subscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId: string, notificationType: string): Promise; + unsubscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId: string, notificationType: string): Promise; createSession(createSessionRequest: CreateSessionRequestOptions): Promise; endSession(sessionId: string): Promise; getSession(sessionId: string): Promise; @@ -638,6 +657,10 @@ export declare class GeneratedApiClient { clearUserSessions(userId: string, queryParameters?: { oauthTokens?: boolean, }): Promise; + listUserSubscriptions(userId: string): Collection; + getUserSubscriptionByNotificationType(userId: string, notificationType: string): Promise; + subscribeUserSubscriptionByNotificationType(userId: string, notificationType: string): Promise; + unsubscribeUserSubscriptionByNotificationType(userId: string, notificationType: string): Promise; listNetworkZones(queryParameters?: { after?: string, limit?: number, diff --git a/src/types/index.d.ts b/src/types/index.d.ts index f05e33918..d5c9f20e2 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -55,6 +55,7 @@ export * from './models/ApplicationCredentialsScheme'; export * from './models/ApplicationCredentialsSigning'; export * from './models/ApplicationCredentialsSigningUse'; export * from './models/ApplicationCredentialsUsernameTemplate'; +export * from './models/ApplicationFeature'; export * from './models/ApplicationGroupAssignment'; export * from './models/ApplicationLicensing'; export * from './models/ApplicationSettings'; @@ -99,8 +100,12 @@ export * from './models/Brand'; export * from './models/BrowserPluginApplication'; export * from './models/CallUserFactor'; export * from './models/CallUserFactorProfile'; +export * from './models/CapabilitiesCreateObject'; +export * from './models/CapabilitiesObject'; +export * from './models/CapabilitiesUpdateObject'; export * from './models/CatalogApplication'; export * from './models/CatalogApplicationStatus'; +export * from './models/ChangeEnum'; export * from './models/ChangePasswordRequest'; export * from './models/ChannelBinding'; export * from './models/ClientPolicyCondition'; @@ -200,6 +205,8 @@ export * from './models/IonForm'; export * from './models/JsonWebKey'; export * from './models/JwkUse'; export * from './models/KnowledgeConstraint'; +export * from './models/LifecycleCreateSettingObject'; +export * from './models/LifecycleDeactivateSettingObject'; export * from './models/LifecycleExpirationPolicyRuleCondition'; export * from './models/LinkedObject'; export * from './models/LinkedObjectDetails'; @@ -231,6 +238,7 @@ export * from './models/NetworkZoneLocation'; export * from './models/NetworkZoneStatus'; export * from './models/NetworkZoneType'; export * from './models/NetworkZoneUsage'; +export * from './models/NotificationType'; export * from './models/OAuth2Actor'; export * from './models/OAuth2Claim'; export * from './models/OAuth2ClaimConditions'; @@ -264,6 +272,9 @@ export * from './models/OpenIdConnectApplicationSettingsClientKeys'; export * from './models/OpenIdConnectApplicationSettingsRefreshToken'; export * from './models/OpenIdConnectApplicationType'; export * from './models/OpenIdConnectRefreshTokenRotationType'; +export * from './models/Org2OrgApplication'; +export * from './models/Org2OrgApplicationSettings'; +export * from './models/Org2OrgApplicationSettingsApp'; export * from './models/OrgContactType'; export * from './models/OrgContactTypeObj'; export * from './models/OrgContactUser'; @@ -302,6 +313,7 @@ export * from './models/PasswordPolicyRuleAction'; export * from './models/PasswordPolicyRuleActions'; export * from './models/PasswordPolicyRuleConditions'; export * from './models/PasswordPolicySettings'; +export * from './models/PasswordSettingObject'; export * from './models/PlatformConditionEvaluatorPlatform'; export * from './models/PlatformConditionEvaluatorPlatformOperatingSystem'; export * from './models/PlatformConditionEvaluatorPlatformOperatingSystemVersion'; @@ -334,6 +346,7 @@ export * from './models/ProfileMapping'; export * from './models/ProfileMappingProperty'; export * from './models/ProfileMappingPropertyPushStatus'; export * from './models/ProfileMappingSource'; +export * from './models/ProfileSettingObject'; export * from './models/Protocol'; export * from './models/ProtocolAlgorithmType'; export * from './models/ProtocolAlgorithmTypeSignature'; @@ -345,6 +358,11 @@ export * from './models/ProtocolRelayStateFormat'; export * from './models/ProtocolSettings'; export * from './models/Provisioning'; export * from './models/ProvisioningConditions'; +export * from './models/ProvisioningConnection'; +export * from './models/ProvisioningConnectionAuthScheme'; +export * from './models/ProvisioningConnectionProfile'; +export * from './models/ProvisioningConnectionRequest'; +export * from './models/ProvisioningConnectionStatus'; export * from './models/ProvisioningDeprovisionedCondition'; export * from './models/ProvisioningGroups'; export * from './models/ProvisioningSuspendedCondition'; @@ -374,6 +392,7 @@ export * from './models/SecurePasswordStoreApplicationSettingsApplication'; export * from './models/SecurityQuestion'; export * from './models/SecurityQuestionUserFactor'; export * from './models/SecurityQuestionUserFactorProfile'; +export * from './models/SeedEnum'; export * from './models/Session'; export * from './models/SessionAuthenticationMethod'; export * from './models/SessionIdentityProvider'; @@ -389,6 +408,8 @@ export * from './models/SmsUserFactor'; export * from './models/SmsUserFactorProfile'; export * from './models/SocialAuthToken'; export * from './models/SpCertificate'; +export * from './models/Subscription'; +export * from './models/SubscriptionStatus'; export * from './models/SwaApplication'; export * from './models/SwaApplicationSettings'; export * from './models/SwaApplicationSettingsApplication'; diff --git a/src/types/models/Application.d.ts b/src/types/models/Application.d.ts index 9c0a976f9..32b9afaf6 100644 --- a/src/types/models/Application.d.ts +++ b/src/types/models/Application.d.ts @@ -27,6 +27,9 @@ import { Csr } from './Csr'; import { OAuth2Token } from './OAuth2Token'; import { OAuth2ScopeConsentGrant } from './OAuth2ScopeConsentGrant'; import { OAuth2ScopeConsentGrantOptions } from './OAuth2ScopeConsentGrant'; +import { ReadStream } from 'fs'; +import { ApplicationFeature } from './ApplicationFeature'; +import { CapabilitiesObjectOptions } from './CapabilitiesObject'; import { ApplicationAccessibility } from './ApplicationAccessibility'; import { ApplicationCredentials } from './ApplicationCredentials'; import { ApplicationLicensing } from './ApplicationLicensing'; @@ -115,6 +118,9 @@ declare class Application extends Resource { getScopeConsentGrant(grantId: string, queryParameters?: { expand?: string, }): Promise; + uploadApplicationLogo(appId: string, file: ReadStream): Promise; + getFeatureForApplication(name: string): Promise; + updateFeatureForApplication(name: string, capabilitiesObject: CapabilitiesObjectOptions): Promise; } export { diff --git a/src/types/models/ApplicationFeature.d.ts b/src/types/models/ApplicationFeature.d.ts new file mode 100644 index 000000000..f4a9eebac --- /dev/null +++ b/src/types/models/ApplicationFeature.d.ts @@ -0,0 +1,40 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { Collection } from '../collection'; +import { CapabilitiesObject } from './CapabilitiesObject'; +import { EnabledStatus } from './EnabledStatus'; + +declare class ApplicationFeature extends Resource { + constructor(resourceJson: Record, client: Client); + + readonly _links: {[name: string]: unknown}; + capabilities: CapabilitiesObject; + description: string; + name: string; + status: EnabledStatus; + + listFeaturesForApplication(appId: string): Collection; +} + +type ApplicationFeatureOptions = OptionalKnownProperties; + +export { + ApplicationFeature, + ApplicationFeatureOptions +}; diff --git a/src/types/models/CapabilitiesCreateObject.d.ts b/src/types/models/CapabilitiesCreateObject.d.ts new file mode 100644 index 000000000..1cb286df9 --- /dev/null +++ b/src/types/models/CapabilitiesCreateObject.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { LifecycleCreateSettingObject } from './LifecycleCreateSettingObject'; + +declare class CapabilitiesCreateObject extends Resource { + constructor(resourceJson: Record, client: Client); + + lifecycleCreate: LifecycleCreateSettingObject; + +} + +type CapabilitiesCreateObjectOptions = OptionalKnownProperties; + +export { + CapabilitiesCreateObject, + CapabilitiesCreateObjectOptions +}; diff --git a/src/types/models/CapabilitiesObject.d.ts b/src/types/models/CapabilitiesObject.d.ts new file mode 100644 index 000000000..5f9d81679 --- /dev/null +++ b/src/types/models/CapabilitiesObject.d.ts @@ -0,0 +1,35 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { CapabilitiesCreateObject } from './CapabilitiesCreateObject'; +import { CapabilitiesUpdateObject } from './CapabilitiesUpdateObject'; + +declare class CapabilitiesObject extends Resource { + constructor(resourceJson: Record, client: Client); + + create: CapabilitiesCreateObject; + update: CapabilitiesUpdateObject; + +} + +type CapabilitiesObjectOptions = OptionalKnownProperties; + +export { + CapabilitiesObject, + CapabilitiesObjectOptions +}; diff --git a/src/types/models/CapabilitiesUpdateObject.d.ts b/src/types/models/CapabilitiesUpdateObject.d.ts new file mode 100644 index 000000000..c2c8f741b --- /dev/null +++ b/src/types/models/CapabilitiesUpdateObject.d.ts @@ -0,0 +1,37 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { LifecycleDeactivateSettingObject } from './LifecycleDeactivateSettingObject'; +import { PasswordSettingObject } from './PasswordSettingObject'; +import { ProfileSettingObject } from './ProfileSettingObject'; + +declare class CapabilitiesUpdateObject extends Resource { + constructor(resourceJson: Record, client: Client); + + lifecycleDeactivate: LifecycleDeactivateSettingObject; + password: PasswordSettingObject; + profile: ProfileSettingObject; + +} + +type CapabilitiesUpdateObjectOptions = OptionalKnownProperties; + +export { + CapabilitiesUpdateObject, + CapabilitiesUpdateObjectOptions +}; diff --git a/src/types/models/ChangeEnum.d.ts b/src/types/models/ChangeEnum.d.ts new file mode 100644 index 000000000..205b8998c --- /dev/null +++ b/src/types/models/ChangeEnum.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +declare enum ChangeEnum { + KEEP_EXISTING = 'KEEP_EXISTING', + CHANGE = 'CHANGE', +} + +export { + ChangeEnum +}; diff --git a/src/types/models/LifecycleCreateSettingObject.d.ts b/src/types/models/LifecycleCreateSettingObject.d.ts new file mode 100644 index 000000000..aa09d865b --- /dev/null +++ b/src/types/models/LifecycleCreateSettingObject.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { EnabledStatus } from './EnabledStatus'; + +declare class LifecycleCreateSettingObject extends Resource { + constructor(resourceJson: Record, client: Client); + + status: EnabledStatus; + +} + +type LifecycleCreateSettingObjectOptions = OptionalKnownProperties; + +export { + LifecycleCreateSettingObject, + LifecycleCreateSettingObjectOptions +}; diff --git a/src/types/models/LifecycleDeactivateSettingObject.d.ts b/src/types/models/LifecycleDeactivateSettingObject.d.ts new file mode 100644 index 000000000..3054cd874 --- /dev/null +++ b/src/types/models/LifecycleDeactivateSettingObject.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { EnabledStatus } from './EnabledStatus'; + +declare class LifecycleDeactivateSettingObject extends Resource { + constructor(resourceJson: Record, client: Client); + + status: EnabledStatus; + +} + +type LifecycleDeactivateSettingObjectOptions = OptionalKnownProperties; + +export { + LifecycleDeactivateSettingObject, + LifecycleDeactivateSettingObjectOptions +}; diff --git a/src/types/models/NotificationType.d.ts b/src/types/models/NotificationType.d.ts new file mode 100644 index 000000000..0e14058a6 --- /dev/null +++ b/src/types/models/NotificationType.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +declare enum NotificationType { + CONNECTOR_AGENT = 'CONNECTOR_AGENT', + USER_LOCKED_OUT = 'USER_LOCKED_OUT', + APP_IMPORT = 'APP_IMPORT', + LDAP_AGENT = 'LDAP_AGENT', + AD_AGENT = 'AD_AGENT', + OKTA_ANNOUNCEMENT = 'OKTA_ANNOUNCEMENT', + OKTA_ISSUE = 'OKTA_ISSUE', + OKTA_UPDATE = 'OKTA_UPDATE', + IWA_AGENT = 'IWA_AGENT', + USER_DEPROVISION = 'USER_DEPROVISION', + REPORT_SUSPICIOUS_ACTIVITY = 'REPORT_SUSPICIOUS_ACTIVITY', + RATELIMIT_NOTIFICATION = 'RATELIMIT_NOTIFICATION', +} + +export { + NotificationType +}; diff --git a/src/types/models/Org2OrgApplication.d.ts b/src/types/models/Org2OrgApplication.d.ts new file mode 100644 index 000000000..772215218 --- /dev/null +++ b/src/types/models/Org2OrgApplication.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { SamlApplication } from './SamlApplication'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { Org2OrgApplicationSettings } from './Org2OrgApplicationSettings'; + +declare class Org2OrgApplication extends SamlApplication { + constructor(resourceJson: Record, client: Client); + + settings: Org2OrgApplicationSettings; + +} + +type Org2OrgApplicationOptions = OptionalKnownProperties; + +export { + Org2OrgApplication, + Org2OrgApplicationOptions +}; diff --git a/src/types/models/Org2OrgApplicationSettings.d.ts b/src/types/models/Org2OrgApplicationSettings.d.ts new file mode 100644 index 000000000..e6344ce44 --- /dev/null +++ b/src/types/models/Org2OrgApplicationSettings.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { SamlApplicationSettings } from './SamlApplicationSettings'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { Org2OrgApplicationSettingsApp } from './Org2OrgApplicationSettingsApp'; + +declare class Org2OrgApplicationSettings extends SamlApplicationSettings { + constructor(resourceJson: Record, client: Client); + + app: Org2OrgApplicationSettingsApp; + +} + +type Org2OrgApplicationSettingsOptions = OptionalKnownProperties; + +export { + Org2OrgApplicationSettings, + Org2OrgApplicationSettingsOptions +}; diff --git a/src/types/models/Org2OrgApplicationSettingsApp.d.ts b/src/types/models/Org2OrgApplicationSettingsApp.d.ts new file mode 100644 index 000000000..a72a52d04 --- /dev/null +++ b/src/types/models/Org2OrgApplicationSettingsApp.d.ts @@ -0,0 +1,35 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { ApplicationSettingsApplication } from './ApplicationSettingsApplication'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; + + +declare class Org2OrgApplicationSettingsApp extends ApplicationSettingsApplication { + constructor(resourceJson: Record, client: Client); + + acsUrl: string; + audRestriction: string; + baseUrl: string; + +} + +type Org2OrgApplicationSettingsAppOptions = OptionalKnownProperties; + +export { + Org2OrgApplicationSettingsApp, + Org2OrgApplicationSettingsAppOptions +}; diff --git a/src/types/models/PasswordSettingObject.d.ts b/src/types/models/PasswordSettingObject.d.ts new file mode 100644 index 000000000..5ded9da0f --- /dev/null +++ b/src/types/models/PasswordSettingObject.d.ts @@ -0,0 +1,37 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { ChangeEnum } from './ChangeEnum'; +import { SeedEnum } from './SeedEnum'; +import { EnabledStatus } from './EnabledStatus'; + +declare class PasswordSettingObject extends Resource { + constructor(resourceJson: Record, client: Client); + + change: ChangeEnum; + seed: SeedEnum; + status: EnabledStatus; + +} + +type PasswordSettingObjectOptions = OptionalKnownProperties; + +export { + PasswordSettingObject, + PasswordSettingObjectOptions +}; diff --git a/src/types/models/ProfileSettingObject.d.ts b/src/types/models/ProfileSettingObject.d.ts new file mode 100644 index 000000000..e854641d0 --- /dev/null +++ b/src/types/models/ProfileSettingObject.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { EnabledStatus } from './EnabledStatus'; + +declare class ProfileSettingObject extends Resource { + constructor(resourceJson: Record, client: Client); + + status: EnabledStatus; + +} + +type ProfileSettingObjectOptions = OptionalKnownProperties; + +export { + ProfileSettingObject, + ProfileSettingObjectOptions +}; diff --git a/src/types/models/ProvisioningConnection.d.ts b/src/types/models/ProvisioningConnection.d.ts new file mode 100644 index 000000000..f923f4110 --- /dev/null +++ b/src/types/models/ProvisioningConnection.d.ts @@ -0,0 +1,40 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { Response } from 'node-fetch'; +import { ProvisioningConnectionAuthScheme } from './ProvisioningConnectionAuthScheme'; +import { ProvisioningConnectionStatus } from './ProvisioningConnectionStatus'; + +declare class ProvisioningConnection extends Resource { + constructor(resourceJson: Record, client: Client); + + readonly _links: {[name: string]: unknown}; + authScheme: ProvisioningConnectionAuthScheme; + status: ProvisioningConnectionStatus; + + getDefaultProvisioningConnectionForApplication(appId: string): Promise; + activateDefaultProvisioningConnectionForApplication(appId: string): Promise; + deactivateDefaultProvisioningConnectionForApplication(appId: string): Promise; +} + +type ProvisioningConnectionOptions = OptionalKnownProperties; + +export { + ProvisioningConnection, + ProvisioningConnectionOptions +}; diff --git a/src/types/models/ProvisioningConnectionAuthScheme.d.ts b/src/types/models/ProvisioningConnectionAuthScheme.d.ts new file mode 100644 index 000000000..bafd5e4dc --- /dev/null +++ b/src/types/models/ProvisioningConnectionAuthScheme.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +declare enum ProvisioningConnectionAuthScheme { + TOKEN = 'TOKEN', + UNKNOWN = 'UNKNOWN', +} + +export { + ProvisioningConnectionAuthScheme +}; diff --git a/src/types/models/ProvisioningConnectionProfile.d.ts b/src/types/models/ProvisioningConnectionProfile.d.ts new file mode 100644 index 000000000..3fbac9561 --- /dev/null +++ b/src/types/models/ProvisioningConnectionProfile.d.ts @@ -0,0 +1,39 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { ProvisioningConnectionRequestOptions } from './ProvisioningConnectionRequest'; +import { ProvisioningConnection } from './ProvisioningConnection'; +import { ProvisioningConnectionAuthScheme } from './ProvisioningConnectionAuthScheme'; + +declare class ProvisioningConnectionProfile extends Resource { + constructor(resourceJson: Record, client: Client); + + authScheme: ProvisioningConnectionAuthScheme; + token: string; + + setDefaultProvisioningConnectionForApplication(appId: string, provisioningConnectionRequest: ProvisioningConnectionRequestOptions, queryParameters?: { + activate?: boolean, + }): Promise; +} + +type ProvisioningConnectionProfileOptions = OptionalKnownProperties; + +export { + ProvisioningConnectionProfile, + ProvisioningConnectionProfileOptions +}; diff --git a/src/types/models/ProvisioningConnectionRequest.d.ts b/src/types/models/ProvisioningConnectionRequest.d.ts new file mode 100644 index 000000000..2f55ff856 --- /dev/null +++ b/src/types/models/ProvisioningConnectionRequest.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { ProvisioningConnectionProfile } from './ProvisioningConnectionProfile'; + +declare class ProvisioningConnectionRequest extends Resource { + constructor(resourceJson: Record, client: Client); + + profile: ProvisioningConnectionProfile; + +} + +type ProvisioningConnectionRequestOptions = OptionalKnownProperties; + +export { + ProvisioningConnectionRequest, + ProvisioningConnectionRequestOptions +}; diff --git a/src/types/models/ProvisioningConnectionStatus.d.ts b/src/types/models/ProvisioningConnectionStatus.d.ts new file mode 100644 index 000000000..2dc9febbe --- /dev/null +++ b/src/types/models/ProvisioningConnectionStatus.d.ts @@ -0,0 +1,24 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +declare enum ProvisioningConnectionStatus { + DISABLED = 'DISABLED', + ENABLED = 'ENABLED', + UNKNOWN = 'UNKNOWN', +} + +export { + ProvisioningConnectionStatus +}; diff --git a/src/types/models/SeedEnum.d.ts b/src/types/models/SeedEnum.d.ts new file mode 100644 index 000000000..bdff33038 --- /dev/null +++ b/src/types/models/SeedEnum.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +declare enum SeedEnum { + OKTA = 'OKTA', + RANDOM = 'RANDOM', +} + +export { + SeedEnum +}; diff --git a/src/types/models/Subscription.d.ts b/src/types/models/Subscription.d.ts new file mode 100644 index 000000000..48401a45a --- /dev/null +++ b/src/types/models/Subscription.d.ts @@ -0,0 +1,47 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +import { Resource } from '../resource'; +import { Client } from '../client'; +import { OptionalKnownProperties } from '../optional-known-properties-type'; +import { Collection } from '../collection'; +import { Response } from 'node-fetch'; +import { NotificationType } from './NotificationType'; +import { SubscriptionStatus } from './SubscriptionStatus'; + +declare class Subscription extends Resource { + constructor(resourceJson: Record, client: Client); + + readonly _links: {[name: string]: unknown}; + channels: string[]; + notificationType: NotificationType; + status: SubscriptionStatus; + + listRoleSubscriptions(roleTypeOrRoleId: string): Collection; + getRoleSubscriptionByNotificationType(roleTypeOrRoleId: string, notificationType: string): Promise; + getUserSubscriptionByNotificationType(userId: string, notificationType: string): Promise; + listUserSubscriptions(userId: string): Collection; + subscribeUserSubscriptionByNotificationType(userId: string, notificationType: string): Promise; + unsubscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId: string, notificationType: string): Promise; + subscribeRoleSubscriptionByNotificationType(roleTypeOrRoleId: string, notificationType: string): Promise; + unsubscribeUserSubscriptionByNotificationType(userId: string, notificationType: string): Promise; +} + +type SubscriptionOptions = OptionalKnownProperties; + +export { + Subscription, + SubscriptionOptions +}; diff --git a/src/types/models/SubscriptionStatus.d.ts b/src/types/models/SubscriptionStatus.d.ts new file mode 100644 index 000000000..a976aca5c --- /dev/null +++ b/src/types/models/SubscriptionStatus.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2017-present, 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 */ + +declare enum SubscriptionStatus { + SUBSCRIBED = 'subscribed', + UNSUBSCRIBED = 'unsubscribed', +} + +export { + SubscriptionStatus +}; diff --git a/templates/factory.js.hbs b/templates/factory.js.hbs index 58c4ac3a7..24ecdc973 100644 --- a/templates/factory.js.hbs +++ b/templates/factory.js.hbs @@ -18,6 +18,10 @@ class {{parentModelName}}Factory extends ModelResolutionFactory { getResolutionProperty() { return '{{propertyName}}'; } + + getParentModel() { + return models.{{parentModelName}}; + } } module.exports = {{parentModelName}}Factory; diff --git a/templates/helpers/operation.js b/templates/helpers/operation.js index 0ed1dd52c..82f5e0019 100644 --- a/templates/helpers/operation.js +++ b/templates/helpers/operation.js @@ -20,6 +20,7 @@ const RESTRICTED_MODEL_PROPERTY_OVERRIDES = { SwaThreeFieldApplication: ['name'], SwaApplication: ['name'], SecurePasswordStoreApplication: ['name'], + Org2OrgApplication: ['name'], }; // properties which should not be included into request payload diff --git a/test/it/application-features.ts b/test/it/application-features.ts new file mode 100644 index 000000000..dacb29806 --- /dev/null +++ b/test/it/application-features.ts @@ -0,0 +1,74 @@ +/* listFeaturesForApplication(appId: string): Collection; +getFeatureForApplication(appId: string, name: string): Promise; +updateFeatureForApplication(appId: string, name: string, capabilitiesObject: CapabilitiesObjectOptions): Promise; +uploadApplicationLogo(appId: string, file: ReadStream): Promise; + */ + +import { expect } from 'chai'; + +import { ApplicationFeature, Client, EnabledStatus } from '@okta/okta-sdk-nodejs'; +import utils = require('../utils'); + +let orgUrl = process.env.OKTA_CLIENT_ORGURL; + +if (process.env.OKTA_USE_MOCK) { + orgUrl = `${orgUrl}/application-features`; +} + +const client = new Client({ + orgUrl: orgUrl, + token: process.env.OKTA_CLIENT_TOKEN, +}); + +describe('Application API: applicaton features', () => { + let application; + beforeEach(async () => { + application = await client.createApplication(utils.getOrg2OrgApplicationOptions()); + }); + + afterEach(async () => { + if (application) { + await application.deactivate(); + await application.delete(); + } + }); + + // application features tests require provisioning connection to be enabled + xit('lists application features', async () => { + const features: ApplicationFeature[] = []; + for await (const feature of client.listFeaturesForApplication(application.id)) { + features.push(feature); + } + expect(features.length).to.be.greaterThanOrEqual(1); + }); + + xit('gets application feature', async () => { + const feature = await client.getFeatureForApplication(application.id, 'USER_PROVISIONING'); + expect(feature.name).to.equal('USER_PROVISIONING'); + }); + + xit('updates application feature', async () => { + let feature = await client.updateFeatureForApplication(application.id, 'USER_PROVISIONING', { + update: { + lifecycleDeactivate: { + status: EnabledStatus.DISABLED + } + } + }); + expect(feature.capabilities.update.lifecycleDeactivate.status).to.equal(EnabledStatus.DISABLED); + feature = await client.updateFeatureForApplication(application.id, 'USER_PROVISIONING', { + update: { + lifecycleDeactivate: { + status: EnabledStatus.ENABLED + } + } + }); + expect(feature.capabilities.update.lifecycleDeactivate.status).to.equal(EnabledStatus.ENABLED); + }); + + it('provides method for uploading application logo', async () => { + const file = utils.getMockImage('logo.png'); + const response = await client.uploadApplicationLogo(application.id, file); + expect(response.status).to.equal(201); + }); +}); diff --git a/test/it/application-provisioning-connection.ts b/test/it/application-provisioning-connection.ts new file mode 100644 index 000000000..97dddf0cc --- /dev/null +++ b/test/it/application-provisioning-connection.ts @@ -0,0 +1,65 @@ +import { expect } from 'chai'; + +import utils = require('../utils'); +import { Client, Org2OrgApplication, ProvisioningConnectionAuthScheme, ProvisioningConnectionStatus } from '@okta/okta-sdk-nodejs'; + +let orgUrl = process.env.OKTA_CLIENT_ORGURL; + +if (process.env.OKTA_USE_MOCK) { + orgUrl = `${orgUrl}/application-provisioning-connection`; +} + +const client = new Client({ + orgUrl: orgUrl, + token: process.env.OKTA_CLIENT_TOKEN, +}); + +describe('Application API: provisioning connection for application', () => { + let application: Org2OrgApplication; + + beforeEach(async () => { + application = await client.createApplication(utils.getOrg2OrgApplicationOptions()); + }); + + afterEach(async () => { + if (application) { + await client.deactivateApplication(application.id); + await client.deleteApplication(application.id); + } + }); + + it('provides method for getting default provisioning connection', async () => { + const provisioningConnection = await client.getDefaultProvisioningConnectionForApplication(application.id); + expect(provisioningConnection.status).to.equal(ProvisioningConnectionStatus.DISABLED); + expect(provisioningConnection.authScheme).to.equal(ProvisioningConnectionAuthScheme.TOKEN); + }); + + it('provides methods for activating and deactivating default provisioning connection', async () => { + try { + const response = await client.activateDefaultProvisioningConnectionForApplication(application.id); + expect(response.status).to.equal(400); + } catch (err) { + expect(err.status).to.equal(400); + expect(err.message).to.contain('Api validation failed: credential. Verification failed: Invalid URL. Not authorized.'); + } + + const response = await client.deactivateDefaultProvisioningConnectionForApplication(application.id); + expect(response.status).to.equal(204); + const provisioningConnection = await client.getDefaultProvisioningConnectionForApplication(application.id); + expect(provisioningConnection.status).to.equal(ProvisioningConnectionStatus.DISABLED); + }); + + it('provides method for creating provisioning connection for application', async () => { + try { + await client.setDefaultProvisioningConnectionForApplication(application.id, { + profile: { + authScheme: ProvisioningConnectionAuthScheme.TOKEN, + token: 'testToken' + } + }); + } catch (err) { + expect(err.status).to.equal(400); + expect(err.message).to.contain('Api validation failed: credential. Verification failed: Invalid URL. Not authorized.'); + } + }); +}); diff --git a/test/it/subscription-role.ts b/test/it/subscription-role.ts new file mode 100644 index 000000000..7d92bfa65 --- /dev/null +++ b/test/it/subscription-role.ts @@ -0,0 +1,40 @@ +import { expect } from 'chai'; + +import { Client, NotificationType, RoleType, SubscriptionStatus } from '@okta/okta-sdk-nodejs'; + +let orgUrl = process.env.OKTA_CLIENT_ORGURL; + +if (process.env.OKTA_USE_MOCK) { + orgUrl = `${orgUrl}/subsctiption-role`; +} + +const client = new Client({ + orgUrl: orgUrl, + token: process.env.OKTA_CLIENT_TOKEN, +}); + +describe('Subscription API', () => { + it('provides method for listing notification subscriptions for given user role', async () => { + const subscriptions = []; + for await (const subscription of client.listRoleSubscriptions(RoleType.ORG_ADMIN)) { + subscriptions.push(subscription); + } + expect(subscriptions).to.be.an('array').that.is.not.empty; + }); + + it('provides method for fetching notification subscription for given user role and notification type', async () => { + const subscription = await client.getRoleSubscriptionByNotificationType(RoleType.ORG_ADMIN, NotificationType.OKTA_UPDATE); + expect(subscription.notificationType).to.equal(NotificationType.OKTA_UPDATE); + }); + + it('provides methods for subscribing/unsubscribing to/from notification subscribtion for given user role and notfication type', async () => { + let response = await client.unsubscribeRoleSubscriptionByNotificationType(RoleType.ORG_ADMIN, NotificationType.OKTA_UPDATE); + expect(response.status).to.equal(200); + let subscription = await client.getRoleSubscriptionByNotificationType(RoleType.ORG_ADMIN, NotificationType.OKTA_UPDATE); + expect(subscription.status).to.equal(SubscriptionStatus.UNSUBSCRIBED); + response = await client.subscribeRoleSubscriptionByNotificationType(RoleType.ORG_ADMIN, NotificationType.OKTA_UPDATE); + expect(response.status).to.equal(200); + subscription = await client.getRoleSubscriptionByNotificationType(RoleType.ORG_ADMIN, NotificationType.OKTA_UPDATE); + expect(subscription.status).to.equal(SubscriptionStatus.SUBSCRIBED); + }); +}); diff --git a/test/it/subscription-user.ts b/test/it/subscription-user.ts new file mode 100644 index 000000000..e9477d9be --- /dev/null +++ b/test/it/subscription-user.ts @@ -0,0 +1,59 @@ +import { expect } from 'chai'; + +import { Client, NotificationType, Subscription, SubscriptionStatus } from '@okta/okta-sdk-nodejs'; +import utils = require('../utils'); + +let orgUrl = process.env.OKTA_CLIENT_ORGURL; + +if (process.env.OKTA_USE_MOCK) { + orgUrl = `${orgUrl}/subsctiption-user`; +} + +const client = new Client({ + orgUrl: orgUrl, + token: process.env.OKTA_CLIENT_TOKEN, +}); + +// User Subscription API endpoints can only be queried by API Token owner +xdescribe('Subscription API', () => { + let user; + const userOptions = { + profile: utils.getMockProfile('subscription-user'), + credentials: { + password: { value: 'Abcd1234' } + } + }; + + beforeEach(async () => { + await utils.cleanup(client, userOptions); + user = await client.createUser(userOptions); + }); + + afterEach(async () => { + await utils.cleanup(client, userOptions); + }); + + it('provides method for listing user\'s notification subscriptions', async () => { + const subscriptions: Subscription[] = []; + for await (const subscription of client.listUserSubscriptions('jd.kuckan+test127@gmail.com')) { + subscriptions.push(subscription); + } + expect(subscriptions).to.be.an('array').which.is.not.empty; + }); + + it('provides method for fetching notification subscription for given user and notification type', async () => { + const subscription = await client.getUserSubscriptionByNotificationType(user.id, NotificationType.OKTA_ISSUE); + expect(subscription.notificationType).to.equal(NotificationType.OKTA_ISSUE); + }); + + it('provides methods for subscribing/unsubscribing to/from notification subscribtion for given user role and notfication type', async () => { + let response = await client.unsubscribeUserSubscriptionByNotificationType(user.id, NotificationType.OKTA_ISSUE); + expect(response.status).to.equal(200); + let subscription = await client.getUserSubscriptionByNotificationType(user.id, NotificationType.OKTA_ISSUE); + expect(subscription.status).to.equal(SubscriptionStatus.UNSUBSCRIBED); + response = await client.subscribeUserSubscriptionByNotificationType(user.id, NotificationType.OKTA_ISSUE); + expect(response.status).to.equal(200); + subscription = await client.getUserSubscriptionByNotificationType(user.id, NotificationType.OKTA_ISSUE); + expect(subscription.status).to.equal(SubscriptionStatus.SUBSCRIBED); + }); +}); diff --git a/test/type/application-api.test-d.ts b/test/type/application-api.test-d.ts new file mode 100644 index 000000000..a35414821 --- /dev/null +++ b/test/type/application-api.test-d.ts @@ -0,0 +1,20 @@ +import { expectType } from 'tsd'; +import { EnabledStatus } from '../../src/types/models/EnabledStatus'; +import { Client } from '../../src/types/client'; +import { ApplicationFeature } from '../../src/types/models/ApplicationFeature'; + +const client = new Client(); +(async function () { + const { value: feature } = await client.listFeaturesForApplication('testAppId').next(); + expectType(feature!); + + expectType(await client.getFeatureForApplication('appId', 'FEATURE_NAME')); + + expectType(await client.updateFeatureForApplication('appId', 'FEATURE_NAME', { + update: { + lifecycleDeactivate: { + status: EnabledStatus.ENABLED + } + } + })); +}()); diff --git a/test/type/subscription-user.ts b/test/type/subscription-user.ts new file mode 100644 index 000000000..1e8c6abcd --- /dev/null +++ b/test/type/subscription-user.ts @@ -0,0 +1,14 @@ +import { expectType } from 'tsd'; +import { Response } from 'node-fetch'; +import { Client } from '../../src/types/client'; +import { NotificationType } from '../../src/types/models/NotificationType'; +import { Subscription } from '../../src/types/models/Subscription'; + +const client = new Client(); +(async function () { + const { value: subscription } = await client.listUserSubscriptions('testAppId').next(); + expectType(subscription!); + expectType(await client.getUserSubscriptionByNotificationType('userId', NotificationType.OKTA_ISSUE)); + expectType(await client.unsubscribeUserSubscriptionByNotificationType('userId', NotificationType.OKTA_ISSUE)); + expectType(await client.subscribeUserSubscriptionByNotificationType('userId', NotificationType.OKTA_ISSUE)); +}()); diff --git a/test/utils.js b/test/utils.js index 869da68ef..d831fd1df 100644 --- a/test/utils.js +++ b/test/utils.js @@ -230,6 +230,21 @@ function getBookmarkApplication() { }; } +function getOrg2OrgApplicationOptions() { + return { + name: 'okta_org2org', + label: 'Sample Okta Org2Org App', + signOnMode: 'SAML_2_0', + settings: { + app: { + acsUrl: 'https://example.atko.com/sso/saml2/exampleid', + audRestriction: 'https://www.atko.com/saml2/service-provider/exampleid', + baseUrl: 'https://example.atko.com' + } + } + }; +} + async function verifyOrgIsOIE(client) { const url = `${client.baseUrl}/.well-known/okta-organization`; const request = { @@ -262,6 +277,7 @@ module.exports = { removeAppByLabel: removeAppByLabel, getMockProfile: getMockProfile, getBookmarkApplication: getBookmarkApplication, + getOrg2OrgApplicationOptions: getOrg2OrgApplicationOptions, getOIDCApplication: getOIDCApplication, verifyOrgIsOIE, getMockImage: getMockImage diff --git a/yarn.lock b/yarn.lock index 8e4be8cfa..3e45bbe5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -554,10 +554,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@okta/openapi@^2.9.2": - version "2.9.2" - resolved "https://registry.yarnpkg.com/@okta/openapi/-/openapi-2.9.2.tgz#ab99800eb3d9baecbd81a10331c19f78347ab014" - integrity sha512-GhUDr7gawiGz5yGKETqReSgt6PvbKMHnFOxs4Gu/mG6tQAruJ7d42Y6ZK3JA2e0/6bBlxc7IsNfukaCVcOZALg== +"@okta/openapi@^2.10.0": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@okta/openapi/-/openapi-2.10.0.tgz#c8b9793395b2c40fad813a9bcb77b2b229c5918b" + integrity sha512-QYdQIHy4zGE4MqlAcGMqeuTvH1bPzqlf8rVd0tlKKSbb1UWtu+HSkNnFJj005fE3+OX++Z0YvumygYhpylXsxQ== dependencies: commander "2.9.0" fs-extra "3.0.1"