import { GitHubClient } from '../../utils/client.js'; import { GitHubWorkflow, GitHubWorkflowListResponse, GitHubWorkflowRun, GitHubWorkflowRunListResponse, GitHubWorkflowRunJobsResponse, WorkflowDispatchOptions, RerunWorkflowOptions } from './types.js'; /** * Class providing GitHub Actions functionality */ export declare class ActionsAPI { private client; constructor(client: GitHubClient); /** * List workflows in a repository * @param owner Repository owner * @param repo Repository name * @param page Page number * @param perPage Items per page */ listWorkflows(owner: string, repo: string, page?: number, perPage?: number): Promise; /** * Get a specific workflow * @param owner Repository owner * @param repo Repository name * @param workflowId Workflow ID or file name */ getWorkflow(owner: string, repo: string, workflowId: number | string): Promise; /** * List workflow runs for a repository * @param owner Repository owner * @param repo Repository name * @param options Additional options for filtering runs */ listWorkflowRuns(owner: string, repo: string, options?: { workflow_id?: number | string; actor?: string; branch?: string; event?: string; status?: 'completed' | 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'skipped' | 'stale' | 'success' | 'timed_out' | 'in_progress' | 'queued' | 'requested' | 'waiting'; created?: string; page?: number; per_page?: number; }): Promise; /** * Get a specific workflow run * @param owner Repository owner * @param repo Repository name * @param runId Run ID */ getWorkflowRun(owner: string, repo: string, runId: number): Promise; /** * List jobs for a workflow run * @param owner Repository owner * @param repo Repository name * @param runId Run ID * @param filter Filter by job status */ listWorkflowRunJobs(owner: string, repo: string, runId: number, filter?: 'latest' | 'all', page?: number, perPage?: number): Promise; /** * Download workflow run logs * @param owner Repository owner * @param repo Repository name * @param runId Run ID * @returns Redirect URL to download logs */ getWorkflowRunLogs(owner: string, repo: string, runId: number): Promise<{ url: string; }>; /** * Trigger a workflow run (workflow_dispatch event) * @param owner Repository owner * @param repo Repository name * @param workflowId Workflow ID or file name * @param options Options for workflow dispatch */ dispatchWorkflow(owner: string, repo: string, workflowId: number | string, options: WorkflowDispatchOptions): Promise; /** * Re-run a workflow * @param owner Repository owner * @param repo Repository name * @param runId Run ID * @param options Options for workflow re-run */ rerunWorkflow(owner: string, repo: string, runId: number, options?: RerunWorkflowOptions): Promise; /** * Cancel a workflow run * @param owner Repository owner * @param repo Repository name * @param runId Run ID */ cancelWorkflowRun(owner: string, repo: string, runId: number): Promise; /** * Enable a workflow * @param owner Repository owner * @param repo Repository name * @param workflowId Workflow ID or file name */ enableWorkflow(owner: string, repo: string, workflowId: number | string): Promise; /** * Disable a workflow * @param owner Repository owner * @param repo Repository name * @param workflowId Workflow ID or file name */ disableWorkflow(owner: string, repo: string, workflowId: number | string): Promise; }