@datadog/datadog-api-client
Version:
OpenAPI client for Datadog APIs
346 lines (345 loc) • 13.5 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 { Case } from "../models/Case";
import { CaseAssignRequest } from "../models/CaseAssignRequest";
import { CaseCreateRequest } from "../models/CaseCreateRequest";
import { CaseEmptyRequest } from "../models/CaseEmptyRequest";
import { CaseResponse } from "../models/CaseResponse";
import { CaseSortableField } from "../models/CaseSortableField";
import { CasesResponse } from "../models/CasesResponse";
import { CaseUpdatePriorityRequest } from "../models/CaseUpdatePriorityRequest";
import { CaseUpdateStatusRequest } from "../models/CaseUpdateStatusRequest";
import { ProjectCreateRequest } from "../models/ProjectCreateRequest";
import { ProjectResponse } from "../models/ProjectResponse";
import { ProjectsResponse } from "../models/ProjectsResponse";
export declare class CaseManagementApiRequestFactory extends BaseAPIRequestFactory {
archiveCase(caseId: string, body: CaseEmptyRequest, _options?: Configuration): Promise<RequestContext>;
assignCase(caseId: string, body: CaseAssignRequest, _options?: Configuration): Promise<RequestContext>;
createCase(body: CaseCreateRequest, _options?: Configuration): Promise<RequestContext>;
createProject(body: ProjectCreateRequest, _options?: Configuration): Promise<RequestContext>;
deleteProject(projectId: string, _options?: Configuration): Promise<RequestContext>;
getCase(caseId: string, _options?: Configuration): Promise<RequestContext>;
getProject(projectId: string, _options?: Configuration): Promise<RequestContext>;
getProjects(_options?: Configuration): Promise<RequestContext>;
searchCases(pageSize?: number, pageNumber?: number, sortField?: CaseSortableField, filter?: string, sortAsc?: boolean, _options?: Configuration): Promise<RequestContext>;
unarchiveCase(caseId: string, body: CaseEmptyRequest, _options?: Configuration): Promise<RequestContext>;
unassignCase(caseId: string, body: CaseEmptyRequest, _options?: Configuration): Promise<RequestContext>;
updatePriority(caseId: string, body: CaseUpdatePriorityRequest, _options?: Configuration): Promise<RequestContext>;
updateStatus(caseId: string, body: CaseUpdateStatusRequest, _options?: Configuration): Promise<RequestContext>;
}
export declare class CaseManagementApiResponseProcessor {
/**
* 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 archiveCase
* @throws ApiException if the response code was not in [200, 299]
*/
archiveCase(response: ResponseContext): Promise<CaseResponse>;
/**
* 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 assignCase
* @throws ApiException if the response code was not in [200, 299]
*/
assignCase(response: ResponseContext): Promise<CaseResponse>;
/**
* 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 createCase
* @throws ApiException if the response code was not in [200, 299]
*/
createCase(response: ResponseContext): Promise<CaseResponse>;
/**
* 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 createProject
* @throws ApiException if the response code was not in [200, 299]
*/
createProject(response: ResponseContext): Promise<ProjectResponse>;
/**
* 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 deleteProject
* @throws ApiException if the response code was not in [200, 299]
*/
deleteProject(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 getCase
* @throws ApiException if the response code was not in [200, 299]
*/
getCase(response: ResponseContext): Promise<CaseResponse>;
/**
* 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 getProject
* @throws ApiException if the response code was not in [200, 299]
*/
getProject(response: ResponseContext): Promise<ProjectResponse>;
/**
* 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 getProjects
* @throws ApiException if the response code was not in [200, 299]
*/
getProjects(response: ResponseContext): Promise<ProjectsResponse>;
/**
* 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 searchCases
* @throws ApiException if the response code was not in [200, 299]
*/
searchCases(response: ResponseContext): Promise<CasesResponse>;
/**
* 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 unarchiveCase
* @throws ApiException if the response code was not in [200, 299]
*/
unarchiveCase(response: ResponseContext): Promise<CaseResponse>;
/**
* 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 unassignCase
* @throws ApiException if the response code was not in [200, 299]
*/
unassignCase(response: ResponseContext): Promise<CaseResponse>;
/**
* 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 updatePriority
* @throws ApiException if the response code was not in [200, 299]
*/
updatePriority(response: ResponseContext): Promise<CaseResponse>;
/**
* 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 updateStatus
* @throws ApiException if the response code was not in [200, 299]
*/
updateStatus(response: ResponseContext): Promise<CaseResponse>;
}
export interface CaseManagementApiArchiveCaseRequest {
/**
* Case's UUID or key
* @type string
*/
caseId: string;
/**
* Archive case payload
* @type CaseEmptyRequest
*/
body: CaseEmptyRequest;
}
export interface CaseManagementApiAssignCaseRequest {
/**
* Case's UUID or key
* @type string
*/
caseId: string;
/**
* Assign case payload
* @type CaseAssignRequest
*/
body: CaseAssignRequest;
}
export interface CaseManagementApiCreateCaseRequest {
/**
* Case payload
* @type CaseCreateRequest
*/
body: CaseCreateRequest;
}
export interface CaseManagementApiCreateProjectRequest {
/**
* Project payload
* @type ProjectCreateRequest
*/
body: ProjectCreateRequest;
}
export interface CaseManagementApiDeleteProjectRequest {
/**
* Project UUID
* @type string
*/
projectId: string;
}
export interface CaseManagementApiGetCaseRequest {
/**
* Case's UUID or key
* @type string
*/
caseId: string;
}
export interface CaseManagementApiGetProjectRequest {
/**
* Project UUID
* @type string
*/
projectId: string;
}
export interface CaseManagementApiSearchCasesRequest {
/**
* Size for a given page. The maximum allowed value is 100.
* @type number
*/
pageSize?: number;
/**
* Specific page number to return.
* @type number
*/
pageNumber?: number;
/**
* Specify which field to sort
* @type CaseSortableField
*/
sortField?: CaseSortableField;
/**
* Search query
* @type string
*/
filter?: string;
/**
* Specify if order is ascending or not
* @type boolean
*/
sortAsc?: boolean;
}
export interface CaseManagementApiUnarchiveCaseRequest {
/**
* Case's UUID or key
* @type string
*/
caseId: string;
/**
* Unarchive case payload
* @type CaseEmptyRequest
*/
body: CaseEmptyRequest;
}
export interface CaseManagementApiUnassignCaseRequest {
/**
* Case's UUID or key
* @type string
*/
caseId: string;
/**
* Unassign case payload
* @type CaseEmptyRequest
*/
body: CaseEmptyRequest;
}
export interface CaseManagementApiUpdatePriorityRequest {
/**
* Case's UUID or key
* @type string
*/
caseId: string;
/**
* Case priority update payload
* @type CaseUpdatePriorityRequest
*/
body: CaseUpdatePriorityRequest;
}
export interface CaseManagementApiUpdateStatusRequest {
/**
* Case's UUID or key
* @type string
*/
caseId: string;
/**
* Case status update payload
* @type CaseUpdateStatusRequest
*/
body: CaseUpdateStatusRequest;
}
export declare class CaseManagementApi {
private requestFactory;
private responseProcessor;
private configuration;
constructor(configuration: Configuration, requestFactory?: CaseManagementApiRequestFactory, responseProcessor?: CaseManagementApiResponseProcessor);
/**
* Archive case
* @param param The request object
*/
archiveCase(param: CaseManagementApiArchiveCaseRequest, options?: Configuration): Promise<CaseResponse>;
/**
* Assign case to a user
* @param param The request object
*/
assignCase(param: CaseManagementApiAssignCaseRequest, options?: Configuration): Promise<CaseResponse>;
/**
* Create a Case
* @param param The request object
*/
createCase(param: CaseManagementApiCreateCaseRequest, options?: Configuration): Promise<CaseResponse>;
/**
* Create a project.
* @param param The request object
*/
createProject(param: CaseManagementApiCreateProjectRequest, options?: Configuration): Promise<ProjectResponse>;
/**
* Remove a project using the project's `id`.
* @param param The request object
*/
deleteProject(param: CaseManagementApiDeleteProjectRequest, options?: Configuration): Promise<void>;
/**
* Get the details of case by `case_id`
* @param param The request object
*/
getCase(param: CaseManagementApiGetCaseRequest, options?: Configuration): Promise<CaseResponse>;
/**
* Get the details of a project by `project_id`.
* @param param The request object
*/
getProject(param: CaseManagementApiGetProjectRequest, options?: Configuration): Promise<ProjectResponse>;
/**
* Get all projects.
* @param param The request object
*/
getProjects(options?: Configuration): Promise<ProjectsResponse>;
/**
* Search cases.
* @param param The request object
*/
searchCases(param?: CaseManagementApiSearchCasesRequest, options?: Configuration): Promise<CasesResponse>;
/**
* Provide a paginated version of searchCases returning a generator with all the items.
*/
searchCasesWithPagination(param?: CaseManagementApiSearchCasesRequest, options?: Configuration): AsyncGenerator<Case>;
/**
* Unarchive case
* @param param The request object
*/
unarchiveCase(param: CaseManagementApiUnarchiveCaseRequest, options?: Configuration): Promise<CaseResponse>;
/**
* Unassign case
* @param param The request object
*/
unassignCase(param: CaseManagementApiUnassignCaseRequest, options?: Configuration): Promise<CaseResponse>;
/**
* Update case priority
* @param param The request object
*/
updatePriority(param: CaseManagementApiUpdatePriorityRequest, options?: Configuration): Promise<CaseResponse>;
/**
* Update case status
* @param param The request object
*/
updateStatus(param: CaseManagementApiUpdateStatusRequest, options?: Configuration): Promise<CaseResponse>;
}