Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Enterprise management): re-gen service after taits object schema… #207

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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