import type { ServiceResult } from '../models/service-result.js'; import type { ProfilingDefinitionService, DefinitionListFilter, DefinitionListPagination, DefinitionListSort, DefinitionListResult } from '../services/ProfilingDefinitionService.js'; /** * Options for the definition list operation. * * Maps directly to the DefinitionListOptions accepted by ProfilingDefinitionService.listDefinitions(). * The operation acts as a thin orchestration layer between command flags and the service. */ export type ListOptions = { /** Filter criteria for narrowing the definition list */ filter?: DefinitionListFilter; /** Pagination parameters (limit, offset) */ pagination?: DefinitionListPagination; /** Sort specification (field, direction) */ sort?: DefinitionListSort; }; /** * Error codes specific to list operations. */ export declare const ListErrorCodes: { /** Service query failed (non-exception failure) */ readonly LIST_FAILED: "LIST_FAILED"; /** Operation failed unexpectedly (exception) */ readonly OPERATION_FAILED: "LIST_OPERATION_FAILED"; }; /** * Orchestrates listing of profiling definitions. * * Follows the 4-layer architecture: Command -> Operation -> Service -> API * This operation layer handles: * 1. Accepts parsed command flags as ListOptions * 2. Delegates to ProfilingDefinitionService.listDefinitions() * 3. Returns ServiceResult with timing metadata * * @example * ```typescript * const operation = new DefinitionListOperation(definitionService); * const result = await operation.execute({ * filter: { status: 'active', objects: ['Account'] }, * pagination: { limit: 10, offset: 0 }, * sort: { field: 'name', direction: 'asc' } * }); * ``` */ export declare class DefinitionListOperation { private readonly definitionService; private readonly logger?; /** * Creates a new DefinitionListOperation. * * @param definitionService - The ProfilingDefinitionService instance for querying definitions * @param logger - Optional logger for debug output */ constructor(definitionService: ProfilingDefinitionService, logger?: Console); /** * Executes the definition list operation. * * Returns a ServiceResult with success=false and one of the following error codes on failure: * - LIST_FAILED: When the underlying service query returns a failure result * - OPERATION_FAILED: When an unexpected exception occurs * * @param options - List options (filter, pagination, sort) * @returns ServiceResult containing DefinitionListResult or error details */ execute(options: ListOptions): Promise>; }