import type { ServiceResult } from '../models/service-result.js'; import type { ProfilingDefinitionService, UpdateAttributesInput } from '../services/ProfilingDefinitionService.js'; /** * Options for the definition update operation. */ export type UpdateOptions = { /** Salesforce record ID of the definition to update */ definitionId: string; /** Partial attribute set to write — at least one must be supplied */ attributes: UpdateAttributesInput; /** Optional logger for debug output */ logger?: Console; }; /** * Result of a definition update operation. */ export type UpdateResult = { /** The Salesforce record ID of the updated definition */ definitionId: string; /** Whether any attributes were written */ updated: boolean; /** Names of the attributes that were written */ updatedAttributes: string[]; }; /** * Error codes specific to update operations. */ export declare const UpdateErrorCodes: { /** Invalid options provided (missing ID or fields) */ readonly INVALID_OPTIONS: "UPDATE_INVALID_OPTIONS"; /** Update operation failed */ readonly UPDATE_FAILED: "UPDATE_FAILED"; }; /** * Orchestrates the update of profiling definition metadata attributes. * * Follows the 4-layer architecture: Command → Operation → Service → API * This operation layer handles business logic orchestration while delegating * the actual update to ProfilingDefinitionService. * * @example * ```typescript * const operation = new DefinitionUpdateOperation(definitionService); * const result = await operation.execute({ * definitionId: 'a00000000000001AAA', * attributes: { name: 'New Name', category: 'Revenue' } * }); * ``` */ export declare class DefinitionUpdateOperation { private readonly definitionService; private readonly logger?; /** * Creates a new DefinitionUpdateOperation. * * @param definitionService - The ProfilingDefinitionService instance for executing updates * @param logger - Optional logger for debug output */ constructor(definitionService: ProfilingDefinitionService, logger?: Console); /** * Validates the update options. * * @param options - The update options to validate * @returns Error message if invalid, undefined if valid */ private static validateOptions; /** * Executes the update operation. * * Returns a ServiceResult with success=false and one of the following error codes on failure: * - INVALID_OPTIONS: Missing ID or no attributes supplied * - UPDATE_FAILED: When the underlying service update fails * * @param options - Update options * @returns ServiceResult containing update results or error details */ execute(options: UpdateOptions): Promise>; }