import type { ServiceResult } from '../models/service-result.js'; import { type UserConfigurationResult, type IConfigurationServiceDeps } from './UserConfigurationTypes.js'; /** * Handles the unconfigure workflow for UserConfigurationService. * * Reverses the actions of configure: unassigns permission sets and * disables API-only profiling. Supports idempotent operation — running * unconfigure on an already-unconfigured user produces skip results. * * This class is instantiated by UserConfigurationService and should not be * used directly by consumers. */ export declare class UnconfigureMode { private readonly deps; constructor(deps: IConfigurationServiceDeps); /** * Creates an empty UserConfigurationResult for error cases. */ private static createEmptyConfigurationResult; /** * Builds the configuration state from readiness check. */ private static buildConfigurationState; /** * Builds the list of unconfiguration actions (reverse of configure actions). */ private static buildUnconfigurationActions; /** * Creates the result when Cuneiform is not installed. */ private static createCuneiformNotInstalledResult; /** * Orchestrates user unconfiguration — reverses the actions of configure(). * * Checks the current user state, identifies configuration items to reverse * (permission set unassignment, API-only profiling disable), and applies them. * * **Idempotency**: Skips already-unconfigured items. Re-running unconfigure() on * an unconfigured user will report all actions as 'skipped'. * * @param userId - The Salesforce user ID to unconfigure * @returns ServiceResult containing UserConfigurationResult with actions taken/skipped/failed */ execute(userId: string): Promise>; /** * Executes a single permission set unassignment action. * Queries for the PermissionSetAssignment record and deletes it. */ private executePermissionSetUnassignAction; /** * Executes a single disable API-only profiling action. */ private executeDisableApiOnlyProfilingAction; /** * Executes all unconfiguration actions sequentially. */ private executeUnconfigurationActions; /** * Fetches user readiness state and user info in parallel. */ private fetchUserReadinessState; /** * Fetches the updated configuration state after applying changes. */ private fetchUpdatedState; /** * Builds the final configuration result based on execution outcomes. */ private buildConfigurationResult; /** * Creates the result when no changes are needed. */ private createNoChangesResult; }