interface IAlertApi {
    baseUrl: string;
    http: HttpClient;
    rest: RestClient;
    userAgent: string;
    vsoClient: VsoClient;
    createAcceptHeader(type: string, apiVersion?: string): string;
    createRequestOptions(type: string, apiVersion?: string): IRequestOptions;
    formatResponse(
        data: any,
        responseTypeMetadata: any,
        isCollection: boolean,
    ): any;
    getAlert(
        project: string,
        alertId: number,
        repository: string,
        ref?: string,
        expand?: ExpandOption,
    ): Promise<Alert>;
    getAlertInstances(
        project: string,
        alertId: number,
        repository: string,
        ref?: string,
    ): Promise<AlertAnalysisInstance[]>;
    getAlerts(
        project: string,
        repository: string,
        top?: number,
        orderBy?: string,
        criteria?: SearchCriteria,
        continuationToken?: string,
    ): Promise<PagedList<Alert>>;
    getAlertSarif(
        project: string,
        alertId: number,
        repository: string,
        ref?: string,
        expand?: ExpandOption,
    ): Promise<string>;
    getSarif(sarifId: number): Promise<SarifUploadStatus>;
    getUxFilters(
        project: string,
        repository: string,
        alertType: AlertType,
    ): Promise<UxFilters>;
    updateAlert(
        stateUpdate: AlertStateUpdate,
        project: string,
        alertId: number,
        repository: string,
    ): Promise<Alert>;
    updateAlertsMetadata(
        alertsMetadata: AlertMetadata[],
        project: string,
        repository: string,
    ): Promise<AlertMetadataChange[]>;
    uploadSarif(
        customHeaders: any,
        contentStream: ReadableStream,
        project: string,
        repository: string,
    ): Promise<number>;
}

Hierarchy (View Summary)

Implemented by

Properties

baseUrl: string
http: HttpClient
rest: RestClient
userAgent: string
vsoClient: VsoClient

Methods

  • Parameters

    • customHeaders: any
    • contentStream: ReadableStream
    • project: string
    • repository: string

    Returns Promise<number>