Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/6.0' into sw-backport-6-0-1
Browse files Browse the repository at this point in the history
  • Loading branch information
shuowu committed Dec 2, 2021
2 parents 79751f4 + 4e7e33c commit 428f884
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
### Features

- [#288](https://github.com/okta/okta-sdk-nodejs/pull/288) Adds option for configuring Response internal buffer size for default cache middleware
## 6.0.1

### Bug Fixes

- [#293](https://github.com/okta/okta-sdk-nodejs/pull/293) Sets correct parent class for `DeviceAccessPolicyRuleCondition`

## 6.0.0

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"safe-flat": "^2.0.2"
},
"devDependencies": {
"@okta/openapi": "^2.9.1",
"@okta/openapi": "^2.9.2",
"@types/chai": "^4.2.22",
"@types/mocha": "^9.0.0",
"@types/node-fetch": "^2.5.8",
Expand Down
5 changes: 5 additions & 0 deletions src/models/AccessPolicyRuleConditions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/models/DeviceAccessPolicyRuleCondition.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/types/models/AccessPolicyRuleConditions.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/types/models/DeviceAccessPolicyRuleCondition.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion templates/helpers/operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const RESTRICTED_MODEL_PROPERTY_OVERRIDES = {
SwaThreeFieldApplication: ['name'],
SwaApplication: ['name'],
SecurePasswordStoreApplication: ['name'],
AccessPolicyRuleConditions: ['device'],
};

// properties which should not be included into request payload
Expand Down
43 changes: 43 additions & 0 deletions test/it/authenticators-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import * as okta from '@okta/okta-sdk-nodejs';
import { AllowedForEnum } from '@okta/okta-sdk-nodejs';
import { expect } from 'chai';
import utils = require('../utils');
let orgUrl = process.env.OKTA_CLIENT_ORGURL;

if (process.env.OKTA_USE_MOCK) {
orgUrl = `${orgUrl}/authenticators-update`;
}

const client = new okta.Client({
orgUrl: orgUrl,
token: process.env.OKTA_CLIENT_TOKEN,
});

describe('Authenticators API tests', () => {
// do not run these tests in a non-OIE context
beforeEach(async function () {
const isOIEOrg = await utils.verifyOrgIsOIE(client);
if (!isOIEOrg) {
this.skip();
}
});

it('should update Authenticator', async () => {
const { value: authenticator} = await client.listAuthenticators().next();

let updatedAuthenticator = await client.updateAuthenticator(authenticator.id, {
name: authenticator.name,
settings: {
allowedFor: AllowedForEnum.ANY
}
});
expect(updatedAuthenticator.settings.allowedFor).to.equal(AllowedForEnum.ANY);
updatedAuthenticator = await client.updateAuthenticator(authenticator.id, {
name: authenticator.name,
settings: {
allowedFor: AllowedForEnum.RECOVERY
}
});
expect(updatedAuthenticator.settings.allowedFor).to.equal(AllowedForEnum.RECOVERY);
});
});
10 changes: 10 additions & 0 deletions test/type/access-policy-rule-condition.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { expectType } from 'tsd';

import { Client } from '../../src/types/client';
import { AccessPolicyRuleConditions } from '../../src/types/models/AccessPolicyRuleConditions';
import { DeviceAccessPolicyRuleCondition } from '../../src/types/models/DeviceAccessPolicyRuleCondition';


const client = new Client();
const ruleConditions = new AccessPolicyRuleConditions({}, client);
expectType<DeviceAccessPolicyRuleCondition>(ruleConditions.device);
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,10 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@okta/openapi@^2.9.1":
version "2.9.1"
resolved "https://registry.yarnpkg.com/@okta/openapi/-/openapi-2.9.1.tgz#7722b9f44b4b44e96166c4e6ade5fe62414d11d7"
integrity sha512-hib3lKNFxQ+oS8ZR+eDTjSwUlGNBYMAKhcmefN3oOJJGyId+iP88r8n9VlydxZe22A0sGu9XYmWX/thG8iTv7g==
"@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==
dependencies:
commander "2.9.0"
fs-extra "3.0.1"
Expand Down

0 comments on commit 428f884

Please sign in to comment.