/** * Composite action executor for chaining API calls * * Why: Reduces roundtrips by fetching related data in sequence (e.g., MR + comments). * Aggregates results into single JSON structure as defined by store_as paths. */ import type { CompositeStep } from '../types/profile.js'; import type { HttpClient } from '../transport/interceptors.js'; import { OpenAPIParser } from '../openapi/openapi-parser.js'; export interface CompositeResult { data: Record; completed_steps: number; total_steps: number; errors?: StepError[]; } export interface StepError { step_index: number; step_call: string; error: string; timestamp: string; } export declare class CompositeExecutor { private parser; private httpClient?; private parameterAliases; constructor(parser: OpenAPIParser, httpClient?: HttpClient | undefined, parameterAliases?: Record); /** * Execute a series of API calls and merge results * * Why parallel: Steps may have dependencies, but independent steps can run concurrently. * Uses DAG analysis to determine safe parallelization while maintaining correctness. * * Supports partial results: If allowPartial=true, continues after errors and returns * what was completed. Useful for composite actions where some data is better than none. */ execute(steps: CompositeStep[], args: Record, allowPartial?: boolean, httpClient?: HttpClient): Promise; /** * Execute single composite step (extracted for parallel execution) * * @param step The composite step to execute * @param stepIndex Original index for error reporting * @param args Arguments for parameter substitution * @param httpClient Optional HTTP client override * @returns Promise resolving to HTTP response */ private executeStep; /** * Parse composite step call syntax * * Format: "GET /projects/{id}/merge_requests/{iid}" */ private parseCall; /** * Resolve path template with actual values * * Example: "/projects/{id}" + {id: "123"} => "/projects/123" * Supports parameter_aliases: {project_id: "123"} can map to {id} if configured */ private resolvePath; /** * Extract query parameters from args based on operation definition */ private extractQueryParams; /** * Store value at JSONPath-like location * * Why nested: Allows semantic structure (comments belong under merge_request object). * * Examples: * - "merge_request" => { merge_request: value } * - "merge_request.comments" => { merge_request: { comments: value } } * * Validates path navigation to prevent overwriting non-object values. */ private storeResult; } //# sourceMappingURL=composite-executor.d.ts.map