UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

37 lines 1.48 kB
import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext"; import { ParameterType } from "@atomist/automation-client/lib/SmartParameters"; import { CommandRegistration } from "../../../api/registration/CommandRegistration"; export declare enum JobTaskType { Command = "command" } export interface JobTask<T extends ParameterType> { type: JobTaskType; parameters: T; } /** * Details of the job to create */ export interface JobDetails<T extends ParameterType> { command: string | CommandRegistration<T>; registration?: string; parameters: T | T[]; name?: string; description?: string; /** Optional maximum number of concurrent tasks; defaults to running all tasks in parallel */ concurrentTasks?: number; } /** * Create a Job in the backend with the provided name and tasks * * A job can execute any registered command in the same or other connected SDM: * * command: name of the CommandRegistration or the registration instance itself * registration: optional name of the SDM this job should be send to; defaults to the current SDM * parameters: Record type with all required parameters for this command * name: optional name of the job * description: optional description of the job used to display to the user in chat or web */ export declare function createJob<T extends ParameterType>(details: JobDetails<T>, ctx: HandlerContext): Promise<{ id: string; }>; //# sourceMappingURL=createJob.d.ts.map