import { BaseRequestOptions, BaseService, PaginatedRequestOptions, Sudo } from '../infrastructure'; import { CommitSchema } from './Commits'; import { PipelineSchema } from './Pipelines'; import { RunnerSchema } from './Runners'; import { UserSchema } from './Users'; export declare type JobScope = 'created' | 'pending' | 'running' | 'failed' | 'success' | 'canceled' | 'skipped' | 'manual'; export interface ArtifactSchema { file_type: string; size: number; filename: string; file_format?: string; } export interface JobSchema { id: number; status: string; stage: string; name: string; ref: string; tag: boolean; coverage?: string; allow_failure: boolean; created_at: Date; started_at?: Date; finished_at?: Date; duration?: number; user: UserSchema; commit: CommitSchema; pipeline: PipelineSchema; web_url: string; artifacts: ArtifactSchema[]; runner: RunnerSchema; artifacts_expire_at?: Date; } export declare class Jobs extends BaseService { all(projectId: string | number, options?: PaginatedRequestOptions): Promise; cancel(projectId: string | number, jobId: number, options?: Sudo): Promise; downloadSingleArtifactFile(projectId: string | number, jobId: number, artifactPath: string, { stream, ...options }: { stream?: boolean; } & BaseRequestOptions): any; downloadSingleArtifactFileFromRef(projectId: string | number, ref: string, artifactPath: string, name: string, { stream, ...options }: { stream?: boolean; } & BaseRequestOptions): any; downloadLatestArtifactFile(projectId: string | number, ref: string, name: string, { stream, ...options }: { stream?: boolean; } & BaseRequestOptions): any; downloadTraceFile(projectId: string | number, jobId: number, options?: Sudo): Promise; erase(projectId: string | number, jobId: number, options?: Sudo): Promise; eraseArtifacts(projectId: string | number, jobId: number, options?: Sudo): Promise; keepArtifacts(projectId: string | number, jobId: number, options?: Sudo): Promise; play(projectId: string | number, jobId: number, options?: Sudo): Promise; retry(projectId: string | number, jobId: number, options?: Sudo): Promise; show(projectId: string | number, jobId: number, options?: Sudo): Promise; showPipelineJobs(projectId: string | number, pipelineId: number, options?: { scope?: JobScope; } & Sudo): Promise; }