/** * Sonatype Lifecycle Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.207.0-01 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { ApiBulkComponentRemediationRequestDTO, ApiComponentDTOV2, ApiComponentDetailsRequestDTOV2, ApiComponentDetailsResultDTOV2, ApiComponentOrPurlIdentifierDTOV2, GetSuggestedRemediationForComponent200Response } from '../models/index'; export interface ComponentsApiDeleteComponentLabelRequest { ownerType: DeleteComponentLabelOwnerTypeEnum; internalOwnerId: string; componentHash: string; labelName: string; } export interface ComponentsApiGetComponentDetailsRequest { apiComponentDetailsRequestDTOV2: ApiComponentDetailsRequestDTOV2; } export interface ComponentsApiGetComponentVersionsRequest { apiComponentOrPurlIdentifierDTOV2?: ApiComponentOrPurlIdentifierDTOV2; } export interface ComponentsApiGetSuggestedRemediationForComponentRequest { ownerType: GetSuggestedRemediationForComponentOwnerTypeEnum; ownerId: string; stageId?: string; identificationSource?: string; scanId?: string; includeParentRemediation?: boolean; apiComponentDTOV2?: ApiComponentDTOV2; } export interface ComponentsApiGetSuggestedRemediationForComponentsRequest { ownerType: GetSuggestedRemediationForComponentsOwnerTypeEnum; ownerId: string; stageId?: string; identificationSource?: string; scanId?: string; includeParentRemediation?: boolean; apiBulkComponentRemediationRequestDTO?: ApiBulkComponentRemediationRequestDTO; } export interface ComponentsApiSetComponentLabelRequest { ownerType: SetComponentLabelOwnerTypeEnum; internalOwnerId: string; componentHash: string; labelName: string; } /** * ComponentsApi - interface * * @export * @interface ComponentsApiInterface */ export interface ComponentsApiInterface { /** * Use this method to un-assign a label from a component. * @param {'application' | 'organization'} ownerType Possible values: application or organization * @param {string} internalOwnerId Possible values : applicationId or organizationId * @param {string} componentHash Enter the SHA1 hash of the component. * @param {string} labelName Enter the label name to un-assign from this component. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ComponentsApiInterface */ deleteComponentLabelRaw(requestParameters: ComponentsApiDeleteComponentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to un-assign a label from a component. */ deleteComponentLabel(requestParameters: ComponentsApiDeleteComponentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to retrieve data related to a component. * @param {ApiComponentDetailsRequestDTOV2} apiComponentDetailsRequestDTOV2 You can retrieve component data in any one of the 3 ways via: 1. Component identifier 2. Package URL 3. Hash * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ComponentsApiInterface */ getComponentDetailsRaw(requestParameters: ComponentsApiGetComponentDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to retrieve data related to a component. */ getComponentDetails(requestParameters: ComponentsApiGetComponentDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to retrieve all known versions of a component. * @param {ApiComponentOrPurlIdentifierDTOV2} [apiComponentOrPurlIdentifierDTOV2] Possible values: Component identifier or packageURL (pURL) identifier in the correct format. Use a-name for JavaScript components. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ComponentsApiInterface */ getComponentVersionsRaw(requestParameters: ComponentsApiGetComponentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Use this method to retrieve all known versions of a component. */ getComponentVersions(requestParameters: ComponentsApiGetComponentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to obtain remediation suggestions for policy violations on a component basis. Remediations obtained from this method are same as those appearing on the Component Details Page in the UI. * @param {'application' | 'organization' | 'repository'} ownerType Possible values: application, organization, repository. * @param {string} ownerId Possible values: applicationId, organizationId or repositoryId. * @param {string} [stageId] Enter the stageId to obtain next-non-failing and next-non-failing-with-dependencies remediation types in the response. Possible values are develop, build, stage-release, release and operate. * @param {string} [identificationSource] Enter the identification source if you want the remediation result based on third-party scan information (non-Sonatype). The identification source can be obtained from the Component Details Page in the UI. * @param {string} [scanId] Enter the scanId (reportId) if you want the remediation result based on third-party scan information (non-Sonatype). * @param {boolean} [includeParentRemediation] Enter true if you want to include parent remediation for transitive dependency in the response based on your application policy scan. * @param {ApiComponentDTOV2} [apiComponentDTOV2] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ComponentsApiInterface */ getSuggestedRemediationForComponentRaw(requestParameters: ComponentsApiGetSuggestedRemediationForComponentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to obtain remediation suggestions for policy violations on a component basis. Remediations obtained from this method are same as those appearing on the Component Details Page in the UI. */ getSuggestedRemediationForComponent(requestParameters: ComponentsApiGetSuggestedRemediationForComponentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Bulk variant of the component remediation endpoint. Accepts a list of components and returns a per-component result for each. This is intended for callers (such as the ServiceNow AppVR integration) that need remediations for many components against the same owner/stage and would otherwise have to make one call per component. The batch is capped at 200 components; larger requests return 400. * @param {'application' | 'organization' | 'repository'} ownerType Possible values: application, organization, repository. * @param {string} ownerId Possible values: applicationId, organizationId or repositoryId. * @param {string} [stageId] Enter the stageId to obtain next-non-failing and next-non-failing-with-dependencies remediation types in the response. Possible values are develop, build, stage-release, release and operate. * @param {string} [identificationSource] Enter the identification source if you want the remediation result based on third-party scan information (non-Sonatype). The identification source can be obtained from the Component Details Page in the UI. * @param {string} [scanId] Enter the scanId (reportId) if you want the remediation result based on third-party scan information (non-Sonatype). * @param {boolean} [includeParentRemediation] Enter true if you want to include parent remediation for transitive dependency in the response based on your application policy scan. * @param {ApiBulkComponentRemediationRequestDTO} [apiBulkComponentRemediationRequestDTO] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ComponentsApiInterface */ getSuggestedRemediationForComponentsRaw(requestParameters: ComponentsApiGetSuggestedRemediationForComponentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Bulk variant of the component remediation endpoint. Accepts a list of components and returns a per-component result for each. This is intended for callers (such as the ServiceNow AppVR integration) that need remediations for many components against the same owner/stage and would otherwise have to make one call per component. The batch is capped at 200 components; larger requests return 400. */ getSuggestedRemediationForComponents(requestParameters: ComponentsApiGetSuggestedRemediationForComponentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to assign an existing label to a component. * @param {'application' | 'organization'} ownerType Possible values: application or organization * @param {string} internalOwnerId Possible values : applicationId or organizationId * @param {string} componentHash Enter the SHA1 hash of the component. * @param {string} labelName Enter the label name to assign to this component. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ComponentsApiInterface */ setComponentLabelRaw(requestParameters: ComponentsApiSetComponentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to assign an existing label to a component. */ setComponentLabel(requestParameters: ComponentsApiSetComponentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** * */ export declare class ComponentsApi extends runtime.BaseAPI implements ComponentsApiInterface { /** * Use this method to un-assign a label from a component. */ deleteComponentLabelRaw(requestParameters: ComponentsApiDeleteComponentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to un-assign a label from a component. */ deleteComponentLabel(requestParameters: ComponentsApiDeleteComponentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to retrieve data related to a component. */ getComponentDetailsRaw(requestParameters: ComponentsApiGetComponentDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to retrieve data related to a component. */ getComponentDetails(requestParameters: ComponentsApiGetComponentDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to retrieve all known versions of a component. */ getComponentVersionsRaw(requestParameters: ComponentsApiGetComponentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Use this method to retrieve all known versions of a component. */ getComponentVersions(requestParameters?: ComponentsApiGetComponentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to obtain remediation suggestions for policy violations on a component basis. Remediations obtained from this method are same as those appearing on the Component Details Page in the UI. */ getSuggestedRemediationForComponentRaw(requestParameters: ComponentsApiGetSuggestedRemediationForComponentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to obtain remediation suggestions for policy violations on a component basis. Remediations obtained from this method are same as those appearing on the Component Details Page in the UI. */ getSuggestedRemediationForComponent(requestParameters: ComponentsApiGetSuggestedRemediationForComponentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Bulk variant of the component remediation endpoint. Accepts a list of components and returns a per-component result for each. This is intended for callers (such as the ServiceNow AppVR integration) that need remediations for many components against the same owner/stage and would otherwise have to make one call per component. The batch is capped at 200 components; larger requests return 400. */ getSuggestedRemediationForComponentsRaw(requestParameters: ComponentsApiGetSuggestedRemediationForComponentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Bulk variant of the component remediation endpoint. Accepts a list of components and returns a per-component result for each. This is intended for callers (such as the ServiceNow AppVR integration) that need remediations for many components against the same owner/stage and would otherwise have to make one call per component. The batch is capped at 200 components; larger requests return 400. */ getSuggestedRemediationForComponents(requestParameters: ComponentsApiGetSuggestedRemediationForComponentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Use this method to assign an existing label to a component. */ setComponentLabelRaw(requestParameters: ComponentsApiSetComponentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Use this method to assign an existing label to a component. */ setComponentLabel(requestParameters: ComponentsApiSetComponentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** * @export */ export declare const DeleteComponentLabelOwnerTypeEnum: { readonly Application: "application"; readonly Organization: "organization"; }; export type DeleteComponentLabelOwnerTypeEnum = typeof DeleteComponentLabelOwnerTypeEnum[keyof typeof DeleteComponentLabelOwnerTypeEnum]; /** * @export */ export declare const GetSuggestedRemediationForComponentOwnerTypeEnum: { readonly Application: "application"; readonly Organization: "organization"; readonly Repository: "repository"; }; export type GetSuggestedRemediationForComponentOwnerTypeEnum = typeof GetSuggestedRemediationForComponentOwnerTypeEnum[keyof typeof GetSuggestedRemediationForComponentOwnerTypeEnum]; /** * @export */ export declare const GetSuggestedRemediationForComponentsOwnerTypeEnum: { readonly Application: "application"; readonly Organization: "organization"; readonly Repository: "repository"; }; export type GetSuggestedRemediationForComponentsOwnerTypeEnum = typeof GetSuggestedRemediationForComponentsOwnerTypeEnum[keyof typeof GetSuggestedRemediationForComponentsOwnerTypeEnum]; /** * @export */ export declare const SetComponentLabelOwnerTypeEnum: { readonly Application: "application"; readonly Organization: "organization"; }; export type SetComponentLabelOwnerTypeEnum = typeof SetComponentLabelOwnerTypeEnum[keyof typeof SetComponentLabelOwnerTypeEnum];