305 lines
5.8 KiB
TypeScript
305 lines
5.8 KiB
TypeScript
/**
|
|
* Generated by orval v8.15.0 🍺
|
|
* Do not edit manually.
|
|
* OpenAPI definition
|
|
* OpenAPI spec version: v0
|
|
*/
|
|
export interface EngineResponse {
|
|
name: string;
|
|
label: string;
|
|
available: boolean;
|
|
}
|
|
|
|
export interface WorkspaceRequest {
|
|
/** @minLength 1 */
|
|
name: string;
|
|
description?: string;
|
|
}
|
|
|
|
export interface WorkspaceResponse {
|
|
id: string;
|
|
/** @minLength 1 */
|
|
name: string;
|
|
description?: string;
|
|
updatedAt: string;
|
|
projectCount?: number;
|
|
}
|
|
|
|
export interface ProjectRequest {
|
|
/** @minLength 1 */
|
|
name: string;
|
|
description?: string;
|
|
}
|
|
|
|
export interface ProjectResponse {
|
|
id: string;
|
|
workspaceId: string;
|
|
/** @minLength 1 */
|
|
name: string;
|
|
description?: string;
|
|
updatedAt: string;
|
|
binaryCount?: number;
|
|
}
|
|
|
|
export interface BinaryResponse {
|
|
id: string;
|
|
projectId: string;
|
|
/** @minLength 1 */
|
|
filename: string;
|
|
fileSize?: number;
|
|
format?: string;
|
|
architecture?: string;
|
|
compiler?: string;
|
|
/** @minLength 1 */
|
|
filePath: string;
|
|
staticAnalysisDone?: boolean;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export type JobResponseType = (typeof JobResponseType)[keyof typeof JobResponseType];
|
|
|
|
export const JobResponseType = {
|
|
ANALYZE_FILE: "ANALYZE_FILE",
|
|
STATIC_ANALYSIS: "STATIC_ANALYSIS",
|
|
GENERATE_EMBEDDINGS: "GENERATE_EMBEDDINGS",
|
|
} as const;
|
|
|
|
export type JobResponseStatus = (typeof JobResponseStatus)[keyof typeof JobResponseStatus];
|
|
|
|
export const JobResponseStatus = {
|
|
ENQUEUED: "ENQUEUED",
|
|
STARTED: "STARTED",
|
|
IN_PROGRESS: "IN_PROGRESS",
|
|
COMPLETED: "COMPLETED",
|
|
FAILED: "FAILED",
|
|
CANCELED: "CANCELED",
|
|
} as const;
|
|
|
|
export interface JobResponse {
|
|
id: string;
|
|
type: JobResponseType;
|
|
status: JobResponseStatus;
|
|
projectId: string;
|
|
binaryId: string;
|
|
binaryName?: string;
|
|
projectName?: string;
|
|
payload?: string;
|
|
result?: string;
|
|
errorMessage?: string;
|
|
retryCount?: number;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface SessionResponse {
|
|
id?: string;
|
|
binaryId?: string;
|
|
projectId?: string;
|
|
title?: string;
|
|
chatModel?: string;
|
|
messageCount?: number;
|
|
createdAt?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface JobListResponse {
|
|
jobs: JobResponse[];
|
|
running?: number;
|
|
queued?: number;
|
|
completed?: number;
|
|
failed?: number;
|
|
}
|
|
|
|
export interface LabelResponse {
|
|
name?: string;
|
|
address?: string;
|
|
type?: string;
|
|
}
|
|
|
|
export interface FunctionDetailResponse {
|
|
id?: string;
|
|
analysisId?: string;
|
|
name?: string;
|
|
address?: string;
|
|
size?: number;
|
|
flags?: string;
|
|
assembly?: string;
|
|
decompiledCode?: string;
|
|
signature?: string;
|
|
callerCount?: number;
|
|
calleeCount?: number;
|
|
labels?: LabelResponse[];
|
|
}
|
|
|
|
export interface XrefResponse {
|
|
id?: string;
|
|
callerId?: string;
|
|
callerName?: string;
|
|
calleeId?: string;
|
|
calleeName?: string;
|
|
type?: string;
|
|
address?: string;
|
|
}
|
|
|
|
export interface MessageResponse {
|
|
id?: string;
|
|
sessionId?: string;
|
|
role?: string;
|
|
content?: string;
|
|
tokenCount?: number;
|
|
createdAt?: string;
|
|
}
|
|
|
|
export interface AnalysisResponse {
|
|
id?: string;
|
|
binaryId?: string;
|
|
jobId?: string;
|
|
engine?: string;
|
|
status?: string;
|
|
functionCount?: number;
|
|
entryPoint?: string;
|
|
createdAt?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface SegmentResponse {
|
|
id?: string;
|
|
name?: string;
|
|
startAddress?: string;
|
|
endAddress?: string;
|
|
}
|
|
|
|
export interface Pageable {
|
|
/** @minimum 0 */
|
|
page?: number;
|
|
/** @minimum 1 */
|
|
size?: number;
|
|
sort?: string[];
|
|
}
|
|
|
|
export interface FunctionSummaryResponse {
|
|
id?: string;
|
|
analysisId?: string;
|
|
name?: string;
|
|
address?: string;
|
|
size?: number;
|
|
flags?: string;
|
|
}
|
|
|
|
export interface SortObject {
|
|
empty?: boolean;
|
|
sorted?: boolean;
|
|
unsorted?: boolean;
|
|
}
|
|
|
|
export interface PageableObject {
|
|
offset?: number;
|
|
paged?: boolean;
|
|
pageNumber?: number;
|
|
pageSize?: number;
|
|
sort?: SortObject;
|
|
unpaged?: boolean;
|
|
}
|
|
|
|
export interface PageFunctionSummaryResponse {
|
|
totalElements?: number;
|
|
totalPages?: number;
|
|
size?: number;
|
|
content?: FunctionSummaryResponse[];
|
|
number?: number;
|
|
pageable?: PageableObject;
|
|
sort?: SortObject;
|
|
first?: boolean;
|
|
last?: boolean;
|
|
numberOfElements?: number;
|
|
empty?: boolean;
|
|
}
|
|
|
|
export type GetWorkspacesParams = {
|
|
/**
|
|
* Filter workspaces whose name contains this value (case-insensitive)
|
|
*/
|
|
name?: string;
|
|
};
|
|
|
|
export type GetProjectsParams = {
|
|
/**
|
|
* Filter projects whose name contains this value (case-insensitive)
|
|
*/
|
|
name?: string;
|
|
};
|
|
|
|
export type GetBinariesParams = {
|
|
/**
|
|
* Filter binaries whose filename contains this value (case-insensitive)
|
|
*/
|
|
name?: string;
|
|
};
|
|
|
|
export type UploadBinaryParams = {
|
|
/**
|
|
* Static analysis engine to use (IDA5, GHIDRA)
|
|
*/
|
|
engine?: string;
|
|
};
|
|
|
|
export type UploadBinaryBody = {
|
|
file: Blob;
|
|
};
|
|
|
|
export type CreateSessionParams = {
|
|
projectId?: string;
|
|
model?: string;
|
|
};
|
|
|
|
export type AnalyzeBinaryParams = {
|
|
/**
|
|
* Static analysis engine to use (IDA5, GHIDRA)
|
|
*/
|
|
engine: string;
|
|
};
|
|
|
|
export type AnalyzeBinary200 = { [key: string]: string };
|
|
|
|
export type GetJobsParams = {
|
|
/**
|
|
* Filter jobs by project id
|
|
*/
|
|
projectId?: string;
|
|
/**
|
|
* Filter jobs by status
|
|
*/
|
|
status?: GetJobsStatus;
|
|
/**
|
|
* Filter jobs by type
|
|
*/
|
|
type?: GetJobsType;
|
|
/**
|
|
* Search term for binary filename or project name (case-insensitive)
|
|
*/
|
|
search?: string;
|
|
};
|
|
|
|
export type GetJobsStatus = (typeof GetJobsStatus)[keyof typeof GetJobsStatus];
|
|
|
|
export const GetJobsStatus = {
|
|
ENQUEUED: "ENQUEUED",
|
|
STARTED: "STARTED",
|
|
IN_PROGRESS: "IN_PROGRESS",
|
|
COMPLETED: "COMPLETED",
|
|
FAILED: "FAILED",
|
|
CANCELED: "CANCELED",
|
|
} as const;
|
|
|
|
export type GetJobsType = (typeof GetJobsType)[keyof typeof GetJobsType];
|
|
|
|
export const GetJobsType = {
|
|
ANALYZE_FILE: "ANALYZE_FILE",
|
|
STATIC_ANALYSIS: "STATIC_ANALYSIS",
|
|
GENERATE_EMBEDDINGS: "GENERATE_EMBEDDINGS",
|
|
} as const;
|
|
|
|
export type ListFunctionsParams = {
|
|
pageable: Pageable;
|
|
};
|