Showing 50 of 159 total issues
File v3.ts
has 3368 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* (C) Copyright IBM Corp. 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
File security-and-compliance-center-api.v3.test.js
has 1230 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @jest-environment node
*/
/**
* (C) Copyright IBM Corp. 2023.
SecurityAndComplianceCenterApiV3
has 47 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class SecurityAndComplianceCenterApiV3 extends BaseService {
static DEFAULT_SERVICE_URL: string = 'https://us-south.compliance.cloud.ibm.com/instances/instance_id/v3';
static DEFAULT_SERVICE_NAME: string = 'security_and_compliance_center_api';
Function replaceProfileAttachment
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public replaceProfileAttachment(
params: SecurityAndComplianceCenterApiV3.ReplaceProfileAttachmentParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentItem>> {
const _params = { ...params };
const _requiredParams = ['attachmentId', 'profilesId'];
Function replaceCustomControlLibrary
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public replaceCustomControlLibrary(
params: SecurityAndComplianceCenterApiV3.ReplaceCustomControlLibraryParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibrary>> {
const _params = { ...params };
const _requiredParams = ['controlLibrariesId'];
Function replaceRule
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public replaceRule(
params: SecurityAndComplianceCenterApiV3.ReplaceRuleParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Rule>> {
const _params = { ...params };
const _requiredParams = ['ruleId', 'ifMatch', 'description', 'target', 'requiredConfig'];
Function listReportResources
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public listReportResources(
params: SecurityAndComplianceCenterApiV3.ListReportResourcesParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ResourcePage>> {
const _params = { ...params };
const _requiredParams = ['reportId'];
Function listReportEvaluations
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public listReportEvaluations(
params: SecurityAndComplianceCenterApiV3.ListReportEvaluationsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.EvaluationPage>> {
const _params = { ...params };
const _requiredParams = ['reportId'];
Function replaceProfile
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public replaceProfile(
params: SecurityAndComplianceCenterApiV3.ReplaceProfileParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
const _params = { ...params };
const _requiredParams = ['profilesId', 'profileName', 'profileDescription', 'profileType', 'controls', 'defaultParameters'];
Function getReportControls
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public getReportControls(
params: SecurityAndComplianceCenterApiV3.GetReportControlsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportControls>> {
const _params = { ...params };
const _requiredParams = ['reportId'];
Function createCustomControlLibrary
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public createCustomControlLibrary(
params: SecurityAndComplianceCenterApiV3.CreateCustomControlLibraryParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibrary>> {
const _params = { ...params };
const _requiredParams = ['controlLibraryName', 'controlLibraryDescription', 'controlLibraryType', 'controls'];
Function updateProviderTypeInstance
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public updateProviderTypeInstance(
params: SecurityAndComplianceCenterApiV3.UpdateProviderTypeInstanceParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeInstanceItem>> {
const _params = { ...params };
const _requiredParams = ['providerTypeId', 'providerTypeInstanceId'];
Function createRule
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public createRule(
params: SecurityAndComplianceCenterApiV3.CreateRuleParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Rule>> {
const _params = { ...params };
const _requiredParams = ['description', 'target', 'requiredConfig'];
Function createProviderTypeInstance
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public createProviderTypeInstance(
params: SecurityAndComplianceCenterApiV3.CreateProviderTypeInstanceParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeInstanceItem>> {
const _params = { ...params };
const _requiredParams = ['providerTypeId'];
Function listReports
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public listReports(
params?: SecurityAndComplianceCenterApiV3.ListReportsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportPage>> {
const _params = { ...params };
const _requiredParams = [];
Function createAttachment
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public createAttachment(
params: SecurityAndComplianceCenterApiV3.CreateAttachmentParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentPrototype>> {
const _params = { ...params };
const _requiredParams = ['profilesId', 'attachments'];
Function listAttachments
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public listAttachments(
params: SecurityAndComplianceCenterApiV3.ListAttachmentsParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentCollection>> {
const _params = { ...params };
const _requiredParams = ['profilesId'];
Function getReportEvaluation
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public getReportEvaluation(
params: SecurityAndComplianceCenterApiV3.GetReportEvaluationParams
): Promise<SecurityAndComplianceCenterApiV3.Response<NodeJS.ReadableStream>> {
const _params = { ...params };
const _requiredParams = ['reportId'];
Function createProfile
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public createProfile(
params: SecurityAndComplianceCenterApiV3.CreateProfileParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
const _params = { ...params };
const _requiredParams = ['profileName', 'profileDescription', 'profileType', 'controls', 'defaultParameters'];
Function getReportViolationsDrift
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public getReportViolationsDrift(
params: SecurityAndComplianceCenterApiV3.GetReportViolationsDriftParams
): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportViolationsDrift>> {
const _params = { ...params };
const _requiredParams = ['reportId'];