Files
bpsets/src/types.d.ts
Minhyeok Park 2b0b862345
All checks were successful
/ deploy_site (push) Successful in 2m24s
feat: move external metadata to embeded
2025-01-02 20:11:14 +09:00

60 lines
1.3 KiB
TypeScript

/**
* This interface defines required structure for all bpsets.
*
* Modifying this interface causes VERY large blast impact.
* SO PLEASE DO NOT MODIFY.
*
* @author Minhyeok Park <pmh_only@pmh.codes>
*/
export interface BPSet {
getMetadata: () => BPSetMetadata
getStats: () => BPSetStats
clearStats: () => void
check: () => Promise<void>
fix: BPSetFixFn
}
export type BPSetFixFn = (
nonCompliantResources: string[],
requiredParametersForFix: {
name: string,
value: string
}[]
) => Promise<void>
export interface BPSetMetadata {
name: string
description: string
priority: number
priorityReason: string
awsService: string
awsServiceCategory: string
bestPracticeCategory: string
requiredParametersForFix: {
name: string
description: string
default: string
example: string
}[]
isFixFunctionUsesDestructiveCommand: boolean
commandUsedInCheckFunction: {
name: string
reason: string
}[]
commandUsedInFixFunction: {
name: string
reason: string
}[]
adviseBeforeFixFunction: string
}
export interface BPSetStats {
nonCompliantResources: string[]
compliantResources: string[]
status: 'LOADED' | 'CHECKING' | 'ERROR' | 'FINISHED'
errorMessage: {
date: Date,
message: string
}[]
}