import type { JenkinsConfig } from './config.js'; export interface JenkinsJobSummary { name: string; url: string; /** 잡 상태 색상. 폴더는 색이 없다. */ color?: string; } /** * 잡 목록. folder 를 주면 그 폴더 안을, 없으면 루트를 조회한다. * 재귀하지 않는다 (한 단계만). */ export declare function listJobs(cfg: JenkinsConfig, folder?: string): Promise; /** * 404 만 "없음" 으로 본다. 401/403/500 을 없음으로 삼키면 upsertJob 이 엉뚱하게 * 생성 분기를 타므로, 그 경우는 원인을 드러내며 throw 한다. */ export declare function jobExists(cfg: JenkinsConfig, jobPath: string): Promise; /** 잡의 config.xml 원문. 백업하거나 수정 전 현재 상태를 확인할 때 쓴다. */ export declare function getJobConfig(cfg: JenkinsConfig, jobPath: string): Promise; /** * 새 잡 생성. 같은 이름이 이미 있으면 Jenkins 가 400 을 준다. * 폴더 안에 만들려면 jobPath 에 "folder/name" 을 넘긴다 (폴더는 미리 존재해야 함). */ export declare function createJob(cfg: JenkinsConfig, jobPath: string, configXml: string): Promise; /** 기존 잡의 config.xml 교체. 잡이 없으면 404. */ export declare function updateJob(cfg: JenkinsConfig, jobPath: string, configXml: string): Promise; /** 있으면 수정, 없으면 생성. Jenkinsfile/job-config.xml 을 레포에서 밀어넣을 때 쓴다. */ export declare function upsertJob(cfg: JenkinsConfig, jobPath: string, configXml: string): Promise<'created' | 'updated'>;