Skip to content

Commit

Permalink
fix(Enterprise management): re-gen service after traits schema change (
Browse files Browse the repository at this point in the history
…#207)

Signed-off-by: namratabhadauriya <[email protected]>
  • Loading branch information
namratabhadauriya authored Apr 27, 2023
1 parent b0b789a commit 7f2fcf8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
14 changes: 11 additions & 3 deletions enterprise-management/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ class EnterpriseManagementV1 extends BaseService {
* @param {string} params.name - The name of the account. This field must have 3 - 60 characters.
* @param {string} params.ownerIamId - The IAM ID of the account owner, such as `IBMid-0123ABC`. The IAM ID must
* already exist.
* @param {JsonObject} [params.traits] - The traits object can be used to opt-out of Multi-Factor Authentication
* setting when creating a child account in the enterprise. This is an optional field.
* @param {CreateAccountRequestTraits} [params.traits] - The traits object can be used to opt-out of Multi-Factor
* Authentication setting when creating a child account in the enterprise. This is an optional field.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<EnterpriseManagementV1.Response<EnterpriseManagementV1.CreateAccountResponse>>}
*/
Expand Down Expand Up @@ -1160,7 +1160,7 @@ namespace EnterpriseManagementV1 {
/** The traits object can be used to opt-out of Multi-Factor Authentication setting when creating a child
* account in the enterprise. This is an optional field.
*/
traits?: JsonObject;
traits?: CreateAccountRequestTraits;
headers?: OutgoingHttpHeaders;
}

Expand Down Expand Up @@ -1351,6 +1351,14 @@ namespace EnterpriseManagementV1 {
account_group_id?: string;
}

/** The traits object can be used to opt-out of Multi-Factor Authentication setting when creating a child account in the enterprise. This is an optional field. */
export interface CreateAccountRequestTraits {
/** By default MFA will be set on the account. To opt out, pass the traits object with the mfa field set to
* empty string.
*/
mfa?: string;
}

/** A newly-created account. */
export interface CreateAccountResponse {
/** The ID of the account entity that was created. */
Expand Down
2 changes: 1 addition & 1 deletion test/integration/enterprise-management.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const EnterpriseManagementV1 = require('../../dist/enterprise-management/v1');
const authHelper = require('../resources/auth-helper.js');

// testcase timeout value (200s).
const timeout = 200000;
const timeout = 300000;

// Location of our config file.
const configFile = 'enterprise_management.env';
Expand Down
9 changes: 8 additions & 1 deletion test/unit/enterprise-management.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,12 +622,19 @@ describe('EnterpriseManagementV1', () => {

describe('createAccount', () => {
describe('positive tests', () => {
// Request models needed by this operation.

// CreateAccountRequestTraits
const createAccountRequestTraitsModel = {
mfa: 'testString',
};

function __createAccountTest() {
// Construct the params object for operation createAccount
const parent = 'testString';
const name = 'testString';
const ownerIamId = 'testString';
const traits = { foo: 'bar' };
const traits = createAccountRequestTraitsModel;
const createAccountParams = {
parent,
name,
Expand Down

0 comments on commit 7f2fcf8

Please sign in to comment.