Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions src/types/eol-scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@ export interface EolScanComponentMetadata {
isEol: boolean;
eolAt: string | null;
eolReasons: string[];
ecosystem: string | null;
cveStats: CveStats[];
releasedAt: Date | null;
isNesPackage: boolean;
nextSupportedVersion: EolScanNextSupportedVersion | null;
daysBehindNextSupported: number | null;
majorVersionsFromNextSupported: number | null;
}

export interface EolScanNextSupportedVersion {
purl: string;
version: string;
releasedAt: Date;
}

export interface NesRemediation {
Expand All @@ -29,21 +41,24 @@ export interface EolScanComponent {
export interface EolReportMetadata {
totalComponentsCount: number;
unknownComponentsCount: number;
totalUniqueComponentsCount: number;
}

export interface EolReport {
id?: string;
id: string;
createdOn: string;
components: EolScanComponent[];
metadata: EolReportMetadata;
page: number;
totalRecords: number;
}

export interface EolReportQueryResponse {
eol: { report: { report: EolReport | null } };
eol: { report: EolReport | null };
}

export interface EolReportMutationResponse {
eol: { createReport: { success: boolean; report: EolReport | null } };
eol: { createReport: { success: boolean; id: string; totalRecords: number } };
}

export interface CreateEolReportInputSbom {
Expand All @@ -59,5 +74,11 @@ export type CreateEolReportInput =
| CreateEolReportInputSbom
| CreateEolReportInputPurls;

export interface GetEolReportInput {
id: string;
page?: number;
size?: number;
}

export const VALID_STATUSES = ['UNKNOWN', 'OK', 'EOL', 'EOL_UPCOMING'] as const;
export type ComponentStatus = (typeof VALID_STATUSES)[number];