@datadog/datadog-api-client
Version:
OpenAPI client for Datadog APIs
96 lines (95 loc) • 4.39 kB
TypeScript
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi";
import { Configuration } from "../../datadog-api-client-common/configuration";
import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http";
import { GetInvestigationResponse } from "../models/GetInvestigationResponse";
import { ListInvestigationsResponse } from "../models/ListInvestigationsResponse";
import { ListInvestigationsResponseData } from "../models/ListInvestigationsResponseData";
import { TriggerInvestigationRequest } from "../models/TriggerInvestigationRequest";
import { TriggerInvestigationResponse } from "../models/TriggerInvestigationResponse";
export declare class BitsAIApiRequestFactory extends BaseAPIRequestFactory {
getInvestigation(id: string, _options?: Configuration): Promise<RequestContext>;
listInvestigations(pageOffset?: number, pageLimit?: number, filterMonitorId?: number, _options?: Configuration): Promise<RequestContext>;
triggerInvestigation(body: TriggerInvestigationRequest, _options?: Configuration): Promise<RequestContext>;
}
export declare class BitsAIApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getInvestigation
* @throws ApiException if the response code was not in [200, 299]
*/
getInvestigation(response: ResponseContext): Promise<GetInvestigationResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listInvestigations
* @throws ApiException if the response code was not in [200, 299]
*/
listInvestigations(response: ResponseContext): Promise<ListInvestigationsResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to triggerInvestigation
* @throws ApiException if the response code was not in [200, 299]
*/
triggerInvestigation(response: ResponseContext): Promise<TriggerInvestigationResponse>;
}
export interface BitsAIApiGetInvestigationRequest {
/**
* The ID of the investigation.
* @type string
*/
id: string;
}
export interface BitsAIApiListInvestigationsRequest {
/**
* Offset for pagination.
* @type number
*/
pageOffset?: number;
/**
* Maximum number of investigations to return.
* @type number
*/
pageLimit?: number;
/**
* Filter investigations by monitor ID.
* @type number
*/
filterMonitorId?: number;
}
export interface BitsAIApiTriggerInvestigationRequest {
/**
* Trigger investigation request body.
* @type TriggerInvestigationRequest
*/
body: TriggerInvestigationRequest;
}
export declare class BitsAIApi {
private requestFactory;
private responseProcessor;
private configuration;
constructor(configuration: Configuration, requestFactory?: BitsAIApiRequestFactory, responseProcessor?: BitsAIApiResponseProcessor);
/**
* Get a specific Bits AI investigation by ID.
* @param param The request object
*/
getInvestigation(param: BitsAIApiGetInvestigationRequest, options?: Configuration): Promise<GetInvestigationResponse>;
/**
* List all Bits AI investigations for the organization.
* @param param The request object
*/
listInvestigations(param?: BitsAIApiListInvestigationsRequest, options?: Configuration): Promise<ListInvestigationsResponse>;
/**
* Provide a paginated version of listInvestigations returning a generator with all the items.
*/
listInvestigationsWithPagination(param?: BitsAIApiListInvestigationsRequest, options?: Configuration): AsyncGenerator<ListInvestigationsResponseData>;
/**
* Trigger a new Bits AI investigation based on a monitor alert.
* @param param The request object
*/
triggerInvestigation(param: BitsAIApiTriggerInvestigationRequest, options?: Configuration): Promise<TriggerInvestigationResponse>;
}