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 { OwnershipEvidenceResponse } from "../models/OwnershipEvidenceResponse"; import { OwnershipFeedbackRequest } from "../models/OwnershipFeedbackRequest"; import { OwnershipFeedbackResponse } from "../models/OwnershipFeedbackResponse"; import { OwnershipHistoryResponse } from "../models/OwnershipHistoryResponse"; import { OwnershipInferenceListResponse } from "../models/OwnershipInferenceListResponse"; import { OwnershipInferenceResponse } from "../models/OwnershipInferenceResponse"; import { OwnershipOwnerType } from "../models/OwnershipOwnerType"; import { OwnershipSettingsRequest } from "../models/OwnershipSettingsRequest"; import { OwnershipSettingsResponse } from "../models/OwnershipSettingsResponse"; import { OwnershipUntaggedFindingsResponse } from "../models/OwnershipUntaggedFindingsResponse"; export declare class CSMOwnershipApiRequestFactory extends BaseAPIRequestFactory { createOwnershipFeedback(resourceId: string, ownerType: OwnershipOwnerType, body: OwnershipFeedbackRequest, _options?: Configuration): Promise; getOwnershipEvidence(resourceId: string, ownerType: OwnershipOwnerType, ifNoneMatch?: string, _options?: Configuration): Promise; getOwnershipInference(resourceId: string, ownerType: OwnershipOwnerType, ifNoneMatch?: string, _options?: Configuration): Promise; getOwnershipSettings(_options?: Configuration): Promise; getOwnershipUntaggedFindings(_options?: Configuration): Promise; listOwnershipHistory(resourceId: string, cursor?: string, limit?: number, _options?: Configuration): Promise; listOwnershipHistoryByOwnerType(resourceId: string, ownerType: OwnershipOwnerType, cursor?: string, limit?: number, _options?: Configuration): Promise; listOwnershipInferences(resourceId: string, _options?: Configuration): Promise; postOwnershipSettings(body: OwnershipSettingsRequest, _options?: Configuration): Promise; } export declare class CSMOwnershipApiResponseProcessor { /** * 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 createOwnershipFeedback * @throws ApiException if the response code was not in [200, 299] */ createOwnershipFeedback(response: ResponseContext): Promise; /** * 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 getOwnershipEvidence * @throws ApiException if the response code was not in [200, 299] */ getOwnershipEvidence(response: ResponseContext): Promise; /** * 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 getOwnershipInference * @throws ApiException if the response code was not in [200, 299] */ getOwnershipInference(response: ResponseContext): Promise; /** * 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 getOwnershipSettings * @throws ApiException if the response code was not in [200, 299] */ getOwnershipSettings(response: ResponseContext): Promise; /** * 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 getOwnershipUntaggedFindings * @throws ApiException if the response code was not in [200, 299] */ getOwnershipUntaggedFindings(response: ResponseContext): Promise; /** * 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 listOwnershipHistory * @throws ApiException if the response code was not in [200, 299] */ listOwnershipHistory(response: ResponseContext): Promise; /** * 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 listOwnershipHistoryByOwnerType * @throws ApiException if the response code was not in [200, 299] */ listOwnershipHistoryByOwnerType(response: ResponseContext): Promise; /** * 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 listOwnershipInferences * @throws ApiException if the response code was not in [200, 299] */ listOwnershipInferences(response: ResponseContext): Promise; /** * 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 postOwnershipSettings * @throws ApiException if the response code was not in [200, 299] */ postOwnershipSettings(response: ResponseContext): Promise; } export interface CSMOwnershipApiCreateOwnershipFeedbackRequest { /** * The identifier of the resource that the feedback applies to. * @type string */ resourceId: string; /** * The type of owner that the feedback applies to. * @type OwnershipOwnerType */ ownerType: OwnershipOwnerType; /** * @type OwnershipFeedbackRequest */ body: OwnershipFeedbackRequest; } export interface CSMOwnershipApiGetOwnershipEvidenceRequest { /** * The identifier of the resource to retrieve evidence for. * @type string */ resourceId: string; /** * The owner type of the inference to retrieve evidence for. * @type OwnershipOwnerType */ ownerType: OwnershipOwnerType; /** * A previously returned weak `ETag` value. When supplied and the evidence has not changed, the endpoint returns `304 Not Modified`. * @type string */ ifNoneMatch?: string; } export interface CSMOwnershipApiGetOwnershipInferenceRequest { /** * The identifier of the resource to retrieve the ownership inference for. * @type string */ resourceId: string; /** * The owner type of the inference to retrieve. * @type OwnershipOwnerType */ ownerType: OwnershipOwnerType; /** * A previously returned `ETag` value. When supplied and the resource has not changed, the endpoint returns `304 Not Modified`. * @type string */ ifNoneMatch?: string; } export interface CSMOwnershipApiListOwnershipHistoryRequest { /** * The identifier of the resource to retrieve inference history for. * @type string */ resourceId: string; /** * An opaque, base64-encoded cursor token returned by a previous call in `pagination.next_cursor`. Omit to fetch the first page. * @type string */ cursor?: string; /** * The maximum number of history entries to return per page. * @type number */ limit?: number; } export interface CSMOwnershipApiListOwnershipHistoryByOwnerTypeRequest { /** * The identifier of the resource to retrieve inference history for. * @type string */ resourceId: string; /** * The owner type to filter history by. * @type OwnershipOwnerType */ ownerType: OwnershipOwnerType; /** * An opaque, base64-encoded cursor token returned by a previous call in `pagination.next_cursor`. Omit to fetch the first page. * @type string */ cursor?: string; /** * The maximum number of history entries to return per page. * @type number */ limit?: number; } export interface CSMOwnershipApiListOwnershipInferencesRequest { /** * The identifier of the resource to retrieve ownership inferences for. * @type string */ resourceId: string; } export interface CSMOwnershipApiPostOwnershipSettingsRequest { /** * @type OwnershipSettingsRequest */ body: OwnershipSettingsRequest; } export declare class CSMOwnershipApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: CSMOwnershipApiRequestFactory, responseProcessor?: CSMOwnershipApiResponseProcessor); /** * Submit feedback on the current ownership inference for a resource and owner type. Valid actions are `confirm`, `reject`, `correct`, and `persist`. * * The request must include the current inference `checksum` in `inference_checksum`. If the checksum does not match the current inference state, the endpoint returns `409 Conflict`. * * When `action` is `correct`, `corrected_owner_handle` and `corrected_owner_type` are required. * @param param The request object */ createOwnershipFeedback(param: CSMOwnershipApiCreateOwnershipFeedbackRequest, options?: Configuration): Promise; /** * Get the evidence versions backing the current ownership inference for a resource and owner type. * * This endpoint supports weak ETag caching. Pass the previously returned `ETag` value in the `If-None-Match` request header to receive a `304 Not Modified` response when the evidence has not changed. * @param param The request object */ getOwnershipEvidence(param: CSMOwnershipApiGetOwnershipEvidenceRequest, options?: Configuration): Promise; /** * Get the current ownership inference for a resource for a specific owner type. * * This endpoint supports ETag-based caching. Pass the previously returned `ETag` value in the `If-None-Match` request header to receive a `304 Not Modified` response when the inference has not changed. * @param param The request object */ getOwnershipInference(param: CSMOwnershipApiGetOwnershipInferenceRequest, options?: Configuration): Promise; /** * Get ownership settings for the org. When settings are unset, the API returns the default opt-out configuration with `auto_tag` set to `true` and `confidence_level` set to `high`. * @param param The request object */ getOwnershipSettings(options?: Configuration): Promise; /** * Count findings with no team tag, grouped by ownership confidence level. * @param param The request object */ getOwnershipUntaggedFindings(options?: Configuration): Promise; /** * List inference history entries for a resource across all owner types, ordered from most recent to oldest. Uses cursor-based pagination. * @param param The request object */ listOwnershipHistory(param: CSMOwnershipApiListOwnershipHistoryRequest, options?: Configuration): Promise; /** * List inference history entries for a resource filtered by owner type, ordered from most recent to oldest. Uses cursor-based pagination. * @param param The request object */ listOwnershipHistoryByOwnerType(param: CSMOwnershipApiListOwnershipHistoryByOwnerTypeRequest, options?: Configuration): Promise; /** * Get all current ownership inferences for a resource, one per owner type (`user`, `team`, `service`, `unknown`). * @param param The request object */ listOwnershipInferences(param: CSMOwnershipApiListOwnershipInferencesRequest, options?: Configuration): Promise; /** * Update ownership settings for the org. * @param param The request object */ postOwnershipSettings(param: CSMOwnershipApiPostOwnershipSettingsRequest, options?: Configuration): Promise; }