import { type ServiceResult } from '../models/service-result.js'; import { ProfileRequestService } from '../services/ProfileRequestService.js'; import type { ProfileRequestCancelResult } from '../models/profile-request-types.js'; /** * Options for the profile request cancel operation. */ export type ProfileRequestCancelOperationOptions = { /** Cancel all cancellable requests */ all?: boolean; /** Cancel specific request IDs (mutually exclusive with `all`) */ requestIds?: string[]; /** Preview what would be cancelled without executing */ dryRun?: boolean; /** Skip confirmation prompt */ noPrompt?: boolean; /** Callback when cancellable requests are found */ onCancellableFound?: (count: number) => void; /** Callback for user confirmation; return false to abort */ onConfirm?: (count: number) => Promise; }; /** * Error codes for profile request cancel operations. * Re-exported from ServiceErrorCodes (E4900-E4905) for convenience. */ export declare const ProfileRequestCancelErrorCodes: { readonly CANCEL_FAILED: "E4902"; readonly INVALID_IDS: "E4903"; readonly NO_CANCELLABLE: "E4904"; readonly PARTIAL_FAILURE: "E4905"; }; /** * Orchestrates cancellation of profiling requests. * * Delegates to ProfileRequestService for the actual cancel logic. * Manages user-facing concerns: confirmation prompts, dry-run previews, * and timing metadata. * * @example * ```typescript * const operation = new ProfileRequestCancelOperation(profileRequestService); * const result = await operation.execute({ all: true, dryRun: true }); * ``` */ export declare class ProfileRequestCancelOperation { private readonly profileRequestService; private readonly logger?; constructor(profileRequestService: ProfileRequestService, logger?: Console | undefined); /** * Creates the empty cancel result structure. */ private static emptyResult; /** * Executes the profile request cancel operation. * * @param options - Cancel operation options * @returns ServiceResult containing the cancel outcome */ execute(options: ProfileRequestCancelOperationOptions): Promise>; }