@datadog/datadog-api-client
Version:
OpenAPI client for Datadog APIs
87 lines (86 loc) • 4.98 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 { EntityIntegrationConfigRequest } from "../models/EntityIntegrationConfigRequest";
import { EntityIntegrationConfigResponse } from "../models/EntityIntegrationConfigResponse";
export declare class EntityIntegrationConfigsApiRequestFactory extends BaseAPIRequestFactory {
deleteEntityIntegrationConfig(integrationId: string, _options?: Configuration): Promise<RequestContext>;
getEntityIntegrationConfig(integrationId: string, _options?: Configuration): Promise<RequestContext>;
updateEntityIntegrationConfig(integrationId: string, body: EntityIntegrationConfigRequest, _options?: Configuration): Promise<RequestContext>;
}
export declare class EntityIntegrationConfigsApiResponseProcessor {
/**
* 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 deleteEntityIntegrationConfig
* @throws ApiException if the response code was not in [200, 299]
*/
deleteEntityIntegrationConfig(response: ResponseContext): Promise<void>;
/**
* 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 getEntityIntegrationConfig
* @throws ApiException if the response code was not in [200, 299]
*/
getEntityIntegrationConfig(response: ResponseContext): Promise<EntityIntegrationConfigResponse>;
/**
* 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 updateEntityIntegrationConfig
* @throws ApiException if the response code was not in [200, 299]
*/
updateEntityIntegrationConfig(response: ResponseContext): Promise<EntityIntegrationConfigResponse>;
}
export interface EntityIntegrationConfigsApiDeleteEntityIntegrationConfigRequest {
/**
* The identifier of the integration whose configuration is being managed. Supported values are `github`, `jira`, and `pagerduty`.
* @type string
*/
integrationId: string;
}
export interface EntityIntegrationConfigsApiGetEntityIntegrationConfigRequest {
/**
* The identifier of the integration whose configuration is being managed. Supported values are `github`, `jira`, and `pagerduty`.
* @type string
*/
integrationId: string;
}
export interface EntityIntegrationConfigsApiUpdateEntityIntegrationConfigRequest {
/**
* The identifier of the integration whose configuration is being managed. Supported values are `github`, `jira`, and `pagerduty`.
* @type string
*/
integrationId: string;
/**
* @type EntityIntegrationConfigRequest
*/
body: EntityIntegrationConfigRequest;
}
export declare class EntityIntegrationConfigsApi {
private requestFactory;
private responseProcessor;
private configuration;
constructor(configuration: Configuration, requestFactory?: EntityIntegrationConfigsApiRequestFactory, responseProcessor?: EntityIntegrationConfigsApiResponseProcessor);
/**
* Delete the configuration stored for a given integration in the caller's organization.
* @param param The request object
*/
deleteEntityIntegrationConfig(param: EntityIntegrationConfigsApiDeleteEntityIntegrationConfigRequest, options?: Configuration): Promise<void>;
/**
* Retrieve the configuration currently stored for a given integration in the caller's organization.
* @param param The request object
*/
getEntityIntegrationConfig(param: EntityIntegrationConfigsApiGetEntityIntegrationConfigRequest, options?: Configuration): Promise<EntityIntegrationConfigResponse>;
/**
* Create or replace the configuration for a given integration in the caller's organization. The shape of `data.attributes.config` depends on the integration:
*
* - For `github`: `config` must contain an `enabled_repos` array of objects with `hostname`, `github_org_name`, and `repo_name`.
* - For `jira`: `config` must contain an `enabled_projects` array of objects with `hostname`, `account_id`, and `project_key`.
* - For `pagerduty`: `config` must contain an `accounts` array of objects with a required `enabled` boolean and an optional `subdomain` string.
* @param param The request object
*/
updateEntityIntegrationConfig(param: EntityIntegrationConfigsApiUpdateEntityIntegrationConfigRequest, options?: Configuration): Promise<EntityIntegrationConfigResponse>;
}