import { Job, type JobDef } from "./job.js"; import type { Permissions } from "./permissions.js"; import type { ConfigValue } from "./step.js"; import type { RefResolver } from "./pin.js"; export interface WorkflowCallInput { type: "string" | "boolean" | "number"; description?: string; required?: boolean; default?: string | boolean | number; } export interface WorkflowCallOutput { description?: string; value: string; } export interface WorkflowCallSecret { description?: string; required?: boolean; } export interface WorkflowCallTrigger { inputs?: Record; outputs?: Record; secrets?: Record; } export interface WorkflowTriggers { push?: { branches?: string[]; branchesIgnore?: string[]; tags?: string[]; tagsIgnore?: string[]; paths?: string[]; pathsIgnore?: string[]; }; pull_request?: { branches?: string[]; branchesIgnore?: string[]; types?: string[]; paths?: string[]; pathsIgnore?: string[]; }; workflow_dispatch?: Record; workflow_call?: WorkflowCallTrigger; schedule?: { cron: string; }[]; [key: string]: unknown; } export interface WorkflowConfig { name: string; runName?: string; on: WorkflowTriggers | string[]; permissions?: Permissions; concurrency?: { group: string; cancelInProgress?: boolean | string; }; env?: Record; defaults?: { run?: { shell?: string; workingDirectory?: string; }; }; jobs?: (JobDef | Job)[]; } export declare class Workflow { #private; constructor(config: WorkflowConfig); toYamlString(options?: { header?: string; }): string; writeToFile(path: string | URL, options?: { header?: string; }): void; writeOrLint(options: { filePath: URL; header?: string; pinDeps?: boolean | { resolve: RefResolver; }; }): void; } /** Gets if linting would occur when using `writeOrLint` on a workflow. */ export declare const isLinting: boolean; /** Gets if pins should be re-resolved when using `writeOrLint` on a workflow. */ export declare function isUpdatingPins(): boolean; export declare function workflow(config: WorkflowConfig): Workflow; //# sourceMappingURL=workflow.d.ts.map