UNPKG

@datadog/datadog-api-client

Version:

OpenAPI client for Datadog APIs

179 lines (178 loc) 8 kB
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 { DORADeploymentRequest } from "../models/DORADeploymentRequest"; import { DORADeploymentResponse } from "../models/DORADeploymentResponse"; import { DORAFailureRequest } from "../models/DORAFailureRequest"; import { DORAFailureResponse } from "../models/DORAFailureResponse"; import { DORAFetchResponse } from "../models/DORAFetchResponse"; import { DORAListDeploymentsRequest } from "../models/DORAListDeploymentsRequest"; import { DORAListFailuresRequest } from "../models/DORAListFailuresRequest"; import { DORAListResponse } from "../models/DORAListResponse"; export declare class DORAMetricsApiRequestFactory extends BaseAPIRequestFactory { createDORADeployment(body: DORADeploymentRequest, _options?: Configuration): Promise<RequestContext>; createDORAFailure(body: DORAFailureRequest, _options?: Configuration): Promise<RequestContext>; createDORAIncident(body: DORAFailureRequest, _options?: Configuration): Promise<RequestContext>; getDORADeployment(deploymentId: string, _options?: Configuration): Promise<RequestContext>; getDORAFailure(failureId: string, _options?: Configuration): Promise<RequestContext>; listDORADeployments(body: DORAListDeploymentsRequest, _options?: Configuration): Promise<RequestContext>; listDORAFailures(body: DORAListFailuresRequest, _options?: Configuration): Promise<RequestContext>; } export declare class DORAMetricsApiResponseProcessor { /** * 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 createDORADeployment * @throws ApiException if the response code was not in [200, 299] */ createDORADeployment(response: ResponseContext): Promise<DORADeploymentResponse>; /** * 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 createDORAFailure * @throws ApiException if the response code was not in [200, 299] */ createDORAFailure(response: ResponseContext): Promise<DORAFailureResponse>; /** * 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 createDORAIncident * @throws ApiException if the response code was not in [200, 299] */ createDORAIncident(response: ResponseContext): Promise<DORAFailureResponse>; /** * 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 getDORADeployment * @throws ApiException if the response code was not in [200, 299] */ getDORADeployment(response: ResponseContext): Promise<DORAFetchResponse>; /** * 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 getDORAFailure * @throws ApiException if the response code was not in [200, 299] */ getDORAFailure(response: ResponseContext): Promise<DORAFetchResponse>; /** * 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 listDORADeployments * @throws ApiException if the response code was not in [200, 299] */ listDORADeployments(response: ResponseContext): Promise<DORAListResponse>; /** * 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 listDORAFailures * @throws ApiException if the response code was not in [200, 299] */ listDORAFailures(response: ResponseContext): Promise<DORAListResponse>; } export interface DORAMetricsApiCreateDORADeploymentRequest { /** * @type DORADeploymentRequest */ body: DORADeploymentRequest; } export interface DORAMetricsApiCreateDORAFailureRequest { /** * @type DORAFailureRequest */ body: DORAFailureRequest; } export interface DORAMetricsApiCreateDORAIncidentRequest { /** * @type DORAFailureRequest */ body: DORAFailureRequest; } export interface DORAMetricsApiGetDORADeploymentRequest { /** * The ID of the deployment event. * @type string */ deploymentId: string; } export interface DORAMetricsApiGetDORAFailureRequest { /** * The ID of the failure event. * @type string */ failureId: string; } export interface DORAMetricsApiListDORADeploymentsRequest { /** * @type DORAListDeploymentsRequest */ body: DORAListDeploymentsRequest; } export interface DORAMetricsApiListDORAFailuresRequest { /** * @type DORAListFailuresRequest */ body: DORAListFailuresRequest; } export declare class DORAMetricsApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: DORAMetricsApiRequestFactory, responseProcessor?: DORAMetricsApiResponseProcessor); /** * Use this API endpoint to provide data about deployments for DORA metrics. * * This is necessary for: * - Deployment Frequency * - Change Lead Time * - Change Failure Rate * @param param The request object */ createDORADeployment(param: DORAMetricsApiCreateDORADeploymentRequest, options?: Configuration): Promise<DORADeploymentResponse>; /** * Use this API endpoint to provide failure data for DORA metrics. * * This is necessary for: * - Change Failure Rate * - Time to Restore * @param param The request object */ createDORAFailure(param: DORAMetricsApiCreateDORAFailureRequest, options?: Configuration): Promise<DORAFailureResponse>; /** * **Note**: This endpoint is deprecated. Please use `/api/v2/dora/failure` instead. * * Use this API endpoint to provide failure data for DORA metrics. * * This is necessary for: * - Change Failure Rate * - Time to Restore * @param param The request object */ createDORAIncident(param: DORAMetricsApiCreateDORAIncidentRequest, options?: Configuration): Promise<DORAFailureResponse>; /** * Use this API endpoint to get a deployment event. * @param param The request object */ getDORADeployment(param: DORAMetricsApiGetDORADeploymentRequest, options?: Configuration): Promise<DORAFetchResponse>; /** * Use this API endpoint to get a failure event. * @param param The request object */ getDORAFailure(param: DORAMetricsApiGetDORAFailureRequest, options?: Configuration): Promise<DORAFetchResponse>; /** * Use this API endpoint to get a list of deployment events. * @param param The request object */ listDORADeployments(param: DORAMetricsApiListDORADeploymentsRequest, options?: Configuration): Promise<DORAListResponse>; /** * Use this API endpoint to get a list of failure events. * @param param The request object */ listDORAFailures(param: DORAMetricsApiListDORAFailuresRequest, options?: Configuration): Promise<DORAListResponse>; }