import { CheckConfigDefaults } from '../services/checkly-config-loader'; import { Parser } from '../services/check-parser/parser'; import { Construct } from './construct'; import { Check, AlertChannelSubscription, AlertChannel, CheckGroup, MaintenanceWindow, Dashboard, PrivateLocation, PrivateLocationCheckAssignment, PrivateLocationGroupAssignment, StatusPage, StatusPageService } from './'; import { PrivateLocationApi } from '../rest/private-locations'; import { FileLoader } from '../loader'; import { Diagnostics } from './diagnostics'; import { ProjectBundle } from './project-bundle'; import { Workspace } from '../services/check-parser/package-files/workspace'; import { PackageManager } from '../services/check-parser/package-files/package-manager'; import { Result } from '../services/check-parser/package-files/result'; import { Runtime } from '../runtimes'; import { Bundler } from '../services/check-parser/bundler'; export interface ProjectProps { /** * Friendly name for your project. */ name: string; /** * Git repository URL. */ repoUrl?: string; } export type Resources = { 'check': Check; 'check-group': CheckGroup; 'alert-channel': AlertChannel; 'alert-channel-subscription': AlertChannelSubscription; 'maintenance-window': MaintenanceWindow; 'private-location': PrivateLocation; 'private-location-check-assignment': PrivateLocationCheckAssignment; 'private-location-group-assignment': PrivateLocationGroupAssignment; 'dashboard': Dashboard; 'status-page': StatusPage; 'status-page-service': StatusPageService; }; export type ProjectData = { [x in keyof Resources]: Record; }; export declare class Project extends Construct { name: string; repoUrl?: string; logicalId: string; testOnlyAllowed: boolean; data: ProjectData; static readonly __checklyType = "project"; /** * Constructs the Project instance * * @param logicalId unique project identifier * @param props project configuration properties */ constructor(logicalId: string, props: ProjectProps); describe(): string; validate(diagnostics: Diagnostics): Promise; allowTestOnly(enabled: boolean): void; addResource(type: string, logicalId: string, resource: Construct): void; bundle(bundler: Bundler): Promise; synthesize(): { project: { logicalId: string; name: string; repoUrl: string | undefined; }; sharedFiles: SharedFile[]; }; getTestOnlyConstructs(): Construct[]; getHeartbeatLogicalIds(): string[]; } export interface ConstructExport { type: string; logicalId: string; filePath: string; exportName: string; } export type CheckFilter = (check: Check) => boolean; export interface SharedFile { path: string; content: string; } export type SharedFileRef = number; export declare class Session { #private; static loader: FileLoader; static project?: Project; static basePath?: string; static contextPath?: string; static checkDefaults?: CheckConfigDefaults; static checkFilter?: CheckFilter; static browserCheckDefaults?: CheckConfigDefaults; static multiStepCheckDefaults?: CheckConfigDefaults; static checkFilePath?: string; static checkFileAbsolutePath?: string; static availableRuntimes: Record; static defaultRuntimeId?: string; static verifyRuntimeDependencies: boolean; static loadingChecklyConfigFile: boolean; static checklyConfigFileConstructs?: Construct[]; static privateLocations: PrivateLocationApi[]; static parsers: Map; static constructExports: ConstructExport[]; static ignoreDirectoriesMatch: string[]; static warnOnWebServerConfig?: boolean; static packageManager: PackageManager; static workspace: Result; static reset(): void; static loadFile(filePath: string): Promise; static registerConstruct(construct: Construct): void; static validateCreateConstruct(construct: Construct): void; static getPrivateLocations(): Promise; static getRuntime(runtimeId?: string): Runtime | undefined; static getParser(runtime: Runtime): Parser; static getPlaywrightParser(): Parser; static relativePosixPath(filePath: string): string; static contextRelativePosixPath(filePath: string): string; static sharedFileRefs: Map; static sharedFiles: SharedFile[]; static registerSharedFile(file: SharedFile): SharedFileRef; static resetSharedFiles(): void; }