import { BaseResource } from '@gitbeaker/requester-utils' ; import { BaseRequestOptions , RequestHelper } from '../infrastructure' ; export interface LintSchema extends Record < string , unknown > { status : string ; errors ? : string [ ] ; warnings ? : string [ ] ; merged_yaml ? : string ; } export interface ContextualLintSchema extends Omit < LintSchema , 'status' > { valid : boolean ; } export class Lint < C extends boolean = false > extends BaseResource < C > { lint ( content , options ? ) { return RequestHelper . post < LintSchema > ( ) ( this , 'ci/lint' , { content , ... options } ) ; } lintWithNamespace ( projectId , content , options ? ) { return RequestHelper . post < ContextualLintSchema > ( ) ( this , `projects/${ projectId }/ci/lint` , { content , ... options , } ) ; } }