import { LifecycleHooks } from '@b64hub/sfpm-core'; import type { FieldHistoryTrackingHooksOptions } from './types.js'; /** * Creates lifecycle hooks for enabling field history tracking post-deployment. * * Registers a hook on `install:post` that ensures `trackHistory` is enabled * on custom fields declared in the package source. The hook: * * 1. Reads the list of fields with `trackHistory=true` from the package * metadata (populated during build by the FHT analyzer) * 2. Queries the target org to find which fields already have tracking enabled * 3. Reads the remaining field metadata from the org via the Metadata API * 4. Enables `trackHistory` on each field and updates the org * * Skips scratch orgs by default, since field history tracking behaves * differently in scratch org environments. * * @param options - Hook configuration options * @returns A LifecycleHooks instance to pass to `defineConfig({ hooks: [...] })` * * @example * ```typescript * // sfpm.config.ts * import { defineConfig } from '@b64hub/sfpm-core'; * import { fieldHistoryTrackingHooks } from '@b64hub/sfpm-hooks'; * * export default defineConfig({ * hooks: [ * fieldHistoryTrackingHooks(), * ], * }); * ``` */ export declare function fieldHistoryTrackingHooks(options?: FieldHistoryTrackingHooksOptions): LifecycleHooks;