import { Api } from "./api"; import { ExecutionContext } from "./getExecutionContext"; import { CodeChecksReport, CodeChecksReportBody } from "./types"; export declare class NotPrError extends Error { constructor(); } export declare class CodechecksClient { private readonly api; readonly context: ExecutionContext; private reports; constructor(api: Api, context: ExecutionContext); private getPublicProjectSlug; getValue(name: string): Promise; saveValue(name: string, value: any): Promise; getFile(name: string, destinationPath: string): Promise; saveFile(name: string, filePath: string): Promise; getDirectory(name: string, destinationPath: string): Promise; saveDirectory(name: string, directoryPath: string): Promise; report(report: CodeChecksReport): Promise; success(report: CodeChecksReportBody): Promise; failure(report: CodeChecksReportBody): Promise; isPr(): boolean; countFailures(): number; countSuccesses(): number; /** * Get browseable link to artifact without it's own domain ie. artifacts.codechecks.io/123/456/report/index.html */ getArtifactLink(path: string): string; /** * Get browseable link to artifact with it's own domain ie. 123--456--report.artifacts.codechecks.io/index.html * Useful for SPAs that manipulate URLs. It will redirect '/' to index.html and you can't customize this behaviour. */ getPageLink(dirPath: string, filenamePath?: string): string; }