import { LifecycleHooks } from '@b64hub/sfpm-core'; import type { FlowActivationHooksOptions } from './types.js'; /** * Creates lifecycle hooks for activating / deactivating flows * post-deployment. * * Registers a hook on `install:post` that reads each flow's intended * status from the package source XML and adjusts the target org to * match: * * - **Active** flows → latest version is activated via the Tooling API. * - **Draft / Obsolete / InvalidDraft** flows → deactivated in the org. * * The hook reads flow components directly from the * `SfpmMetadataPackage.flows` getter (backed by the `ComponentSet`), * so no additional dependency on `@salesforce/source-deploy-retrieve` * is required. * * @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 { flowActivationHooks } from '@b64hub/sfpm-hooks'; * * export default defineConfig({ * hooks: [ * flowActivationHooks({ skipAlreadyActive: true }), * ], * }); * ``` */ export declare function flowActivationHooks(options?: FlowActivationHooksOptions): LifecycleHooks;